mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 12:34:35 +03:00
- Moved to cxxtool to generate build.h compiler and platform based definitions.
- Compiler no longer works on its own, it requires Assembler. - Labels created by Assembler and Compiler now share their IDs, so they can be used nearly interchangeably without weird side-effects and hacks. - Renamed getError() and setError() to getLastError() and setLastError(). - Renamed compiler nodes to "HL" nodes (preparation for HLStream). - Renamed FuncConv to CallConv. - Function calling convention is now part of FuncPrototype. - Added a possibility to align by inserting zeros (kAlignZero) - Fixed assertion in X86Compiler that didn't like unhandled function argument(s). - Added Compiler::embedConstPool() helper, which can be handy if you use your own ConstPool. - Code refactorization and other minor changes. - CpuTicks::now() renamed to Utils::getTickCount(). - error.h merged with globals.h - Documentation updates related to recent API changes.
This commit is contained in:
@@ -16,8 +16,7 @@ var hasOwn = Object.prototype.hasOwnProperty;
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
function upFirst(s) {
|
||||
if (!s)
|
||||
return s;
|
||||
if (!s) return "";
|
||||
return s[0].toUpperCase() + s.substr(1);
|
||||
}
|
||||
|
||||
@@ -167,7 +166,7 @@ IndexedString.prototype.index = function() {
|
||||
|
||||
IndexedString.prototype.format = function(indent) {
|
||||
if (this.size === -1)
|
||||
throw new Error("IndexedString not indexed yet, call index()");
|
||||
throw new Error("IndexedString - not indexed yet, call index()");
|
||||
|
||||
var s = "";
|
||||
var array = this.array;
|
||||
@@ -183,16 +182,16 @@ IndexedString.prototype.format = function(indent) {
|
||||
|
||||
IndexedString.prototype.getSize = function() {
|
||||
if (this.size === -1)
|
||||
throw new Error("IndexedString not indexed yet, call index()");
|
||||
throw new Error("IndexedString - not indexed yet, call index()");
|
||||
return this.size;
|
||||
};
|
||||
|
||||
IndexedString.prototype.getIndex = function(k) {
|
||||
if (this.size === -1)
|
||||
throw new Error("IndexedString not indexed yet, call index()");
|
||||
throw new Error("IndexedString - not indexed yet, call index()");
|
||||
|
||||
if (!hasOwn.call(this.map, k))
|
||||
throw new Error("Key '" + k + "' not found in IndexedString.");
|
||||
throw new Error("IndexedString - key '" + k + "' not found.");
|
||||
|
||||
return this.map[k];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user