Push version 2.1.1 to trunk.
[ES5] Implemented Object.defineProperty.
Improved profiler support.
Added SetPrototype method in the public V8 API.
Added GetScriptOrigin and GetScriptLineNumber methods to Function objects in the API.
Performance improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@3905 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/x64/macro-assembler-x64.h b/src/x64/macro-assembler-x64.h
index 2913274..6deeddc 100644
--- a/src/x64/macro-assembler-x64.h
+++ b/src/x64/macro-assembler-x64.h
@@ -98,6 +98,7 @@
void CopyRegistersFromStackToMemory(Register base,
Register scratch,
RegList regs);
+ void DebugBreak();
#endif
// ---------------------------------------------------------------------------
@@ -148,6 +149,10 @@
const ParameterCount& actual,
InvokeFlag flag);
+ void InvokeFunction(JSFunction* function,
+ const ParameterCount& actual,
+ InvokeFlag flag);
+
// Invoke specified builtin JavaScript function. Adds an entry to
// the unresolved list if the name does not resolve.
void InvokeBuiltin(Builtins::JavaScript id, InvokeFlag flag);
@@ -460,6 +465,14 @@
// Always use unsigned comparisons: above and below, not less and greater.
void CmpInstanceType(Register map, InstanceType type);
+ // Check if the map of an object is equal to a specified map and
+ // branch to label if not. Skip the smi check if not required
+ // (object is known to be a heap object)
+ void CheckMap(Register obj,
+ Handle<Map> map,
+ Label* fail,
+ bool is_heap_object);
+
// Check if the object in register heap_object is a string. Afterwards the
// register map contains the object map and the register instance_type
// contains the instance_type. The registers map and instance_type can be the
@@ -473,6 +486,9 @@
// jcc instructions (je, ja, jae, jb, jbe, je, and jz).
void FCmp();
+ // Abort execution if argument is not a number. Used in debug code.
+ void AbortIfNotNumber(Register object, const char* msg);
+
// ---------------------------------------------------------------------------
// Exception handling
@@ -635,6 +651,10 @@
// Convenience function: Same as above, but takes the fid instead.
void CallRuntime(Runtime::FunctionId id, int num_arguments);
+ // Convenience function: call an external reference.
+ void CallExternalReference(const ExternalReference& ext,
+ int num_arguments);
+
// Tail call of a runtime routine (jump).
// Like JumpToRuntime, but also takes care of passing the number
// of arguments.
@@ -671,13 +691,6 @@
void Ret();
- struct Unresolved {
- int pc;
- uint32_t flags; // see Bootstrapper::FixupFlags decoders/encoders.
- const char* name;
- };
- List<Unresolved>* unresolved() { return &unresolved_; }
-
Handle<Object> CodeObject() { return code_object_; }
@@ -709,11 +722,10 @@
bool allow_stub_calls() { return allow_stub_calls_; }
private:
- List<Unresolved> unresolved_;
bool generating_stub_;
bool allow_stub_calls_;
- Handle<Object> code_object_; // This handle will be patched with the code
- // object on installation.
+ // This handle will be patched with the code object on installation.
+ Handle<Object> code_object_;
// Helper functions for generating invokes.
void InvokePrologue(const ParameterCount& expected,
@@ -723,18 +735,6 @@
Label* done,
InvokeFlag flag);
- // Prepares for a call or jump to a builtin by doing two things:
- // 1. Emits code that fetches the builtin's function object from the context
- // at runtime, and puts it in the register rdi.
- // 2. Fetches the builtin's code object, and returns it in a handle, at
- // compile time, so that later code can emit instructions to jump or call
- // the builtin directly. If the code object has not yet been created, it
- // returns the builtin code object for IllegalFunction, and sets the
- // output parameter "resolved" to false. Code that uses the return value
- // should then add the address and the builtin name to the list of fixups
- // called unresolved_, which is fixed up by the bootstrapper.
- Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved);
-
// Activation support.
void EnterFrame(StackFrame::Type type);
void LeaveFrame(StackFrame::Type type);