Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1214)

Unified Diff: src/x64/code-stubs-x64.cc

Issue 6992072: Implement set trap for proxies, and revamp class hierarchy in preparation (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index a53505d935213b5ad57082f1b0fdf63c4d259f6d..ebf5c825cd7c71f564cf4099b16193b3e4fdb251 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -266,7 +266,7 @@ void ToBooleanStub::Generate(MacroAssembler* masm) {
__ j(not_zero, &false_result, Label::kNear);
// JavaScript object => true.
- __ cmpq(rcx, Immediate(FIRST_JS_OBJECT_TYPE));
+ __ cmpq(rcx, Immediate(FIRST_OBJECT_OR_FUNCTION_CLASS_TYPE));
__ j(above_equal, &true_result, Label::kNear);
// String value => false iff empty.
@@ -2717,8 +2717,8 @@ void CompareStub::Generate(MacroAssembler* masm) {
factory->heap_number_map());
__ j(equal, &heap_number, Label::kNear);
if (cc_ != equal) {
- // Call runtime on identical JSObjects. Otherwise return equal.
- __ CmpObjectType(rax, FIRST_JS_OBJECT_TYPE, rcx);
+ // Call runtime on identical objects. Otherwise return equal.
+ __ CmpObjectType(rax, FIRST_OBJECT_OR_FUNCTION_CLASS_TYPE, rcx);
__ j(above_equal, &not_identical, Label::kNear);
}
__ Set(rax, EQUAL);
@@ -2776,7 +2776,7 @@ void CompareStub::Generate(MacroAssembler* masm) {
// If the first object is a JS object, we have done pointer comparison.
STATIC_ASSERT(LAST_TYPE == JS_FUNCTION_TYPE);
Label first_non_object;
- __ CmpObjectType(rax, FIRST_JS_OBJECT_TYPE, rcx);
+ __ CmpObjectType(rax, FIRST_OBJECT_OR_FUNCTION_CLASS_TYPE, rcx);
__ j(below, &first_non_object, Label::kNear);
// Return non-zero (eax (not rax) is not zero)
Label return_not_equal;
@@ -2789,7 +2789,7 @@ void CompareStub::Generate(MacroAssembler* masm) {
__ CmpInstanceType(rcx, ODDBALL_TYPE);
__ j(equal, &return_not_equal);
- __ CmpObjectType(rdx, FIRST_JS_OBJECT_TYPE, rcx);
+ __ CmpObjectType(rdx, FIRST_OBJECT_OR_FUNCTION_CLASS_TYPE, rcx);
__ j(above_equal, &return_not_equal);
// Check for oddballs: true, false, null, undefined.
@@ -2885,9 +2885,9 @@ void CompareStub::Generate(MacroAssembler* masm) {
__ lea(rcx, Operand(rax, rdx, times_1, 0));
__ testb(rcx, Immediate(kSmiTagMask));
__ j(not_zero, &not_both_objects, Label::kNear);
- __ CmpObjectType(rax, FIRST_JS_OBJECT_TYPE, rbx);
+ __ CmpObjectType(rax, FIRST_OBJECT_OR_FUNCTION_CLASS_TYPE, rbx);
__ j(below, &not_both_objects, Label::kNear);
- __ CmpObjectType(rdx, FIRST_JS_OBJECT_TYPE, rcx);
+ __ CmpObjectType(rdx, FIRST_OBJECT_OR_FUNCTION_CLASS_TYPE, rcx);
__ j(below, &not_both_objects, Label::kNear);
__ testb(FieldOperand(rbx, Map::kBitFieldOffset),
Immediate(1 << Map::kIsUndetectable));
@@ -2964,7 +2964,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
__ JumpIfSmi(rax, &receiver_is_value);
// Check if the receiver is a valid JS object.
- __ CmpObjectType(rax, FIRST_JS_OBJECT_TYPE, rdi);
+ __ CmpObjectType(rax, FIRST_OBJECT_OR_FUNCTION_CLASS_TYPE, rdi);
__ j(above_equal, &receiver_is_js_object);
// Call the runtime to box the value.
@@ -3415,9 +3415,9 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
__ JumpIfSmi(rax, &slow);
// Check that the left hand is a JS object. Leave its map in rax.
- __ CmpObjectType(rax, FIRST_JS_OBJECT_TYPE, rax);
+ __ CmpObjectType(rax, FIRST_OBJECT_CLASS_TYPE, rax);
__ j(below, &slow);
- __ CmpInstanceType(rax, LAST_JS_OBJECT_TYPE);
+ __ CmpInstanceType(rax, LAST_OBJECT_CLASS_TYPE);
__ j(above, &slow);
// Get the prototype of the function.
@@ -3442,9 +3442,9 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
// Check that the function prototype is a JS object.
__ JumpIfSmi(rbx, &slow);
- __ CmpObjectType(rbx, FIRST_JS_OBJECT_TYPE, kScratchRegister);
+ __ CmpObjectType(rbx, FIRST_OBJECT_CLASS_TYPE, kScratchRegister);
__ j(below, &slow);
- __ CmpInstanceType(kScratchRegister, LAST_JS_OBJECT_TYPE);
+ __ CmpInstanceType(kScratchRegister, LAST_OBJECT_CLASS_TYPE);
__ j(above, &slow);
// Register mapping:

Powered by Google App Engine
This is Rietveld 408576698