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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 1708313002: [stubs] Introduce a dedicated FastNewObjectStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove TODO. Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 test(object, Immediate(kSmiTagMask)); 947 test(object, Immediate(kSmiTagMask));
948 Check(not_equal, kOperandIsASmiAndNotABoundFunction); 948 Check(not_equal, kOperandIsASmiAndNotABoundFunction);
949 Push(object); 949 Push(object);
950 CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object); 950 CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object);
951 Pop(object); 951 Pop(object);
952 Check(equal, kOperandIsNotABoundFunction); 952 Check(equal, kOperandIsNotABoundFunction);
953 } 953 }
954 } 954 }
955 955
956 956
957 void MacroAssembler::AssertReceiver(Register object) {
958 if (emit_debug_code()) {
959 test(object, Immediate(kSmiTagMask));
960 Check(not_equal, kOperandIsASmiAndNotAReceiver);
961 Push(object);
962 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE);
963 CmpObjectType(object, FIRST_JS_RECEIVER_TYPE, object);
964 Pop(object);
965 Check(above_equal, kOperandIsNotAReceiver);
966 }
967 }
968
969
957 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { 970 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) {
958 if (emit_debug_code()) { 971 if (emit_debug_code()) {
959 Label done_checking; 972 Label done_checking;
960 AssertNotSmi(object); 973 AssertNotSmi(object);
961 cmp(object, isolate()->factory()->undefined_value()); 974 cmp(object, isolate()->factory()->undefined_value());
962 j(equal, &done_checking); 975 j(equal, &done_checking);
963 cmp(FieldOperand(object, 0), 976 cmp(FieldOperand(object, 0),
964 Immediate(isolate()->factory()->allocation_site_map())); 977 Immediate(isolate()->factory()->allocation_site_map()));
965 Assert(equal, kExpectedUndefinedOrCell); 978 Assert(equal, kExpectedUndefinedOrCell);
966 bind(&done_checking); 979 bind(&done_checking);
(...skipping 2250 matching lines...) Expand 10 before | Expand all | Expand 10 after
3217 mov(eax, dividend); 3230 mov(eax, dividend);
3218 shr(eax, 31); 3231 shr(eax, 31);
3219 add(edx, eax); 3232 add(edx, eax);
3220 } 3233 }
3221 3234
3222 3235
3223 } // namespace internal 3236 } // namespace internal
3224 } // namespace v8 3237 } // namespace v8
3225 3238
3226 #endif // V8_TARGET_ARCH_IA32 3239 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698