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

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

Issue 1573243009: [builtins] Migrate Number constructor similar to String constructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 3251 matching lines...) Expand 10 before | Expand all | Expand 10 after
3262 Register map, 3262 Register map,
3263 Register type_reg, 3263 Register type_reg,
3264 InstanceType type, 3264 InstanceType type,
3265 Label* if_cond_pass, 3265 Label* if_cond_pass,
3266 Condition cond) { 3266 Condition cond) {
3267 CompareObjectType(object, map, type_reg, type); 3267 CompareObjectType(object, map, type_reg, type);
3268 B(cond, if_cond_pass); 3268 B(cond, if_cond_pass);
3269 } 3269 }
3270 3270
3271 3271
3272 void MacroAssembler::AllocateJSValue(Register result, Register constructor,
3273 Register value, Register scratch1,
3274 Register scratch2, Label* gc_required) {
3275 DCHECK(!result.is(constructor));
3276 DCHECK(!result.is(scratch1));
3277 DCHECK(!result.is(scratch2));
3278 DCHECK(!result.is(value));
3279
3280 // Allocate JSValue in new space.
3281 Allocate(JSValue::kSize, result, scratch1, scratch2, gc_required, TAG_OBJECT);
3282
3283 // Initialize the JSValue.
3284 LoadGlobalFunctionInitialMap(constructor, scratch1, scratch2);
3285 Str(scratch1, FieldMemOperand(result, HeapObject::kMapOffset));
3286 LoadRoot(scratch1, Heap::kEmptyFixedArrayRootIndex);
3287 Str(scratch1, FieldMemOperand(result, JSObject::kPropertiesOffset));
3288 Str(scratch1, FieldMemOperand(result, JSObject::kElementsOffset));
3289 Str(value, FieldMemOperand(result, JSValue::kValueOffset));
3290 STATIC_ASSERT(JSValue::kSize == 4 * kPointerSize);
3291 }
3292
3293
3272 void MacroAssembler::JumpIfNotObjectType(Register object, 3294 void MacroAssembler::JumpIfNotObjectType(Register object,
3273 Register map, 3295 Register map,
3274 Register type_reg, 3296 Register type_reg,
3275 InstanceType type, 3297 InstanceType type,
3276 Label* if_not_object) { 3298 Label* if_not_object) {
3277 JumpIfObjectType(object, map, type_reg, type, if_not_object, ne); 3299 JumpIfObjectType(object, map, type_reg, type, if_not_object, ne);
3278 } 3300 }
3279 3301
3280 3302
3281 // Sets condition flags based on comparison, and returns type in type_reg. 3303 // Sets condition flags based on comparison, and returns type in type_reg.
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after
4878 } 4900 }
4879 4901
4880 4902
4881 #undef __ 4903 #undef __
4882 4904
4883 4905
4884 } // namespace internal 4906 } // namespace internal
4885 } // namespace v8 4907 } // namespace v8
4886 4908
4887 #endif // V8_TARGET_ARCH_ARM64 4909 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | src/bootstrapper.cc » ('j') | src/x64/builtins-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698