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

Side by Side Diff: src/arm64/lithium-codegen-arm64.cc

Issue 408463003: Remove harmony-typeof (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update flag description for harmony Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arm64/lithium-codegen-arm64.h" 7 #include "src/arm64/lithium-codegen-arm64.h"
8 #include "src/arm64/lithium-gap-resolver-arm64.h" 8 #include "src/arm64/lithium-gap-resolver-arm64.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 5828 matching lines...) Expand 10 before | Expand all | Expand 10 after
5839 5839
5840 __ JumpIfSmi(value, false_label); 5840 __ JumpIfSmi(value, false_label);
5841 __ CompareObjectType(value, map, scratch, SYMBOL_TYPE); 5841 __ CompareObjectType(value, map, scratch, SYMBOL_TYPE);
5842 EmitBranch(instr, eq); 5842 EmitBranch(instr, eq);
5843 5843
5844 } else if (String::Equals(type_name, factory->boolean_string())) { 5844 } else if (String::Equals(type_name, factory->boolean_string())) {
5845 __ JumpIfRoot(value, Heap::kTrueValueRootIndex, true_label); 5845 __ JumpIfRoot(value, Heap::kTrueValueRootIndex, true_label);
5846 __ CompareRoot(value, Heap::kFalseValueRootIndex); 5846 __ CompareRoot(value, Heap::kFalseValueRootIndex);
5847 EmitBranch(instr, eq); 5847 EmitBranch(instr, eq);
5848 5848
5849 } else if (FLAG_harmony_typeof &&
5850 String::Equals(type_name, factory->null_string())) {
5851 __ CompareRoot(value, Heap::kNullValueRootIndex);
5852 EmitBranch(instr, eq);
5853
5854 } else if (String::Equals(type_name, factory->undefined_string())) { 5849 } else if (String::Equals(type_name, factory->undefined_string())) {
5855 ASSERT(instr->temp1() != NULL); 5850 ASSERT(instr->temp1() != NULL);
5856 Register scratch = ToRegister(instr->temp1()); 5851 Register scratch = ToRegister(instr->temp1());
5857 5852
5858 __ JumpIfRoot(value, Heap::kUndefinedValueRootIndex, true_label); 5853 __ JumpIfRoot(value, Heap::kUndefinedValueRootIndex, true_label);
5859 __ JumpIfSmi(value, false_label); 5854 __ JumpIfSmi(value, false_label);
5860 // Check for undetectable objects and jump to the true branch in this case. 5855 // Check for undetectable objects and jump to the true branch in this case.
5861 __ Ldr(scratch, FieldMemOperand(value, HeapObject::kMapOffset)); 5856 __ Ldr(scratch, FieldMemOperand(value, HeapObject::kMapOffset));
5862 __ Ldrb(scratch, FieldMemOperand(scratch, Map::kBitFieldOffset)); 5857 __ Ldrb(scratch, FieldMemOperand(scratch, Map::kBitFieldOffset));
5863 EmitTestAndBranch(instr, ne, scratch, 1 << Map::kIsUndetectable); 5858 EmitTestAndBranch(instr, ne, scratch, 1 << Map::kIsUndetectable);
5864 5859
5865 } else if (String::Equals(type_name, factory->function_string())) { 5860 } else if (String::Equals(type_name, factory->function_string())) {
5866 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); 5861 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2);
5867 ASSERT(instr->temp1() != NULL); 5862 ASSERT(instr->temp1() != NULL);
5868 Register type = ToRegister(instr->temp1()); 5863 Register type = ToRegister(instr->temp1());
5869 5864
5870 __ JumpIfSmi(value, false_label); 5865 __ JumpIfSmi(value, false_label);
5871 __ JumpIfObjectType(value, type, type, JS_FUNCTION_TYPE, true_label); 5866 __ JumpIfObjectType(value, type, type, JS_FUNCTION_TYPE, true_label);
5872 // HeapObject's type has been loaded into type register by JumpIfObjectType. 5867 // HeapObject's type has been loaded into type register by JumpIfObjectType.
5873 EmitCompareAndBranch(instr, eq, type, JS_FUNCTION_PROXY_TYPE); 5868 EmitCompareAndBranch(instr, eq, type, JS_FUNCTION_PROXY_TYPE);
5874 5869
5875 } else if (String::Equals(type_name, factory->object_string())) { 5870 } else if (String::Equals(type_name, factory->object_string())) {
5876 ASSERT((instr->temp1() != NULL) && (instr->temp2() != NULL)); 5871 ASSERT((instr->temp1() != NULL) && (instr->temp2() != NULL));
5877 Register map = ToRegister(instr->temp1()); 5872 Register map = ToRegister(instr->temp1());
5878 Register scratch = ToRegister(instr->temp2()); 5873 Register scratch = ToRegister(instr->temp2());
5879 5874
5880 __ JumpIfSmi(value, false_label); 5875 __ JumpIfSmi(value, false_label);
5881 if (!FLAG_harmony_typeof) { 5876 __ JumpIfRoot(value, Heap::kNullValueRootIndex, true_label);
5882 __ JumpIfRoot(value, Heap::kNullValueRootIndex, true_label);
5883 }
5884 __ JumpIfObjectType(value, map, scratch, 5877 __ JumpIfObjectType(value, map, scratch,
5885 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, false_label, lt); 5878 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, false_label, lt);
5886 __ CompareInstanceType(map, scratch, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); 5879 __ CompareInstanceType(map, scratch, LAST_NONCALLABLE_SPEC_OBJECT_TYPE);
5887 __ B(gt, false_label); 5880 __ B(gt, false_label);
5888 // Check for undetectable objects => false. 5881 // Check for undetectable objects => false.
5889 __ Ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); 5882 __ Ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset));
5890 EmitTestAndBranch(instr, eq, scratch, 1 << Map::kIsUndetectable); 5883 EmitTestAndBranch(instr, eq, scratch, 1 << Map::kIsUndetectable);
5891 5884
5892 } else { 5885 } else {
5893 __ B(false_label); 5886 __ B(false_label);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
6042 Handle<ScopeInfo> scope_info = instr->scope_info(); 6035 Handle<ScopeInfo> scope_info = instr->scope_info();
6043 __ Push(scope_info); 6036 __ Push(scope_info);
6044 __ Push(ToRegister(instr->function())); 6037 __ Push(ToRegister(instr->function()));
6045 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6038 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6046 RecordSafepoint(Safepoint::kNoLazyDeopt); 6039 RecordSafepoint(Safepoint::kNoLazyDeopt);
6047 } 6040 }
6048 6041
6049 6042
6050 6043
6051 } } // namespace v8::internal 6044 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698