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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.cc

Issue 1287983002: [compiler] Remove broken support for undetectable strings. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('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 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 4963 matching lines...) Expand 10 before | Expand all | Expand 10 after
4974 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 4974 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
4975 4975
4976 Factory* factory = isolate()->factory(); 4976 Factory* factory = isolate()->factory();
4977 if (String::Equals(check, factory->number_string())) { 4977 if (String::Equals(check, factory->number_string())) {
4978 __ JumpIfSmi(rax, if_true); 4978 __ JumpIfSmi(rax, if_true);
4979 __ movp(rax, FieldOperand(rax, HeapObject::kMapOffset)); 4979 __ movp(rax, FieldOperand(rax, HeapObject::kMapOffset));
4980 __ CompareRoot(rax, Heap::kHeapNumberMapRootIndex); 4980 __ CompareRoot(rax, Heap::kHeapNumberMapRootIndex);
4981 Split(equal, if_true, if_false, fall_through); 4981 Split(equal, if_true, if_false, fall_through);
4982 } else if (String::Equals(check, factory->string_string())) { 4982 } else if (String::Equals(check, factory->string_string())) {
4983 __ JumpIfSmi(rax, if_false); 4983 __ JumpIfSmi(rax, if_false);
4984 // Check for undetectable objects => false.
4985 __ CmpObjectType(rax, FIRST_NONSTRING_TYPE, rdx); 4984 __ CmpObjectType(rax, FIRST_NONSTRING_TYPE, rdx);
4986 __ j(above_equal, if_false); 4985 Split(below, if_true, if_false, fall_through);
4987 __ testb(FieldOperand(rdx, Map::kBitFieldOffset),
4988 Immediate(1 << Map::kIsUndetectable));
4989 Split(zero, if_true, if_false, fall_through);
4990 } else if (String::Equals(check, factory->symbol_string())) { 4986 } else if (String::Equals(check, factory->symbol_string())) {
4991 __ JumpIfSmi(rax, if_false); 4987 __ JumpIfSmi(rax, if_false);
4992 __ CmpObjectType(rax, SYMBOL_TYPE, rdx); 4988 __ CmpObjectType(rax, SYMBOL_TYPE, rdx);
4993 Split(equal, if_true, if_false, fall_through); 4989 Split(equal, if_true, if_false, fall_through);
4994 } else if (String::Equals(check, factory->boolean_string())) { 4990 } else if (String::Equals(check, factory->boolean_string())) {
4995 __ CompareRoot(rax, Heap::kTrueValueRootIndex); 4991 __ CompareRoot(rax, Heap::kTrueValueRootIndex);
4996 __ j(equal, if_true); 4992 __ j(equal, if_true);
4997 __ CompareRoot(rax, Heap::kFalseValueRootIndex); 4993 __ CompareRoot(rax, Heap::kFalseValueRootIndex);
4998 Split(equal, if_true, if_false, fall_through); 4994 Split(equal, if_true, if_false, fall_through);
4999 } else if (String::Equals(check, factory->undefined_string())) { 4995 } else if (String::Equals(check, factory->undefined_string())) {
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
5330 Assembler::target_address_at(call_target_address, 5326 Assembler::target_address_at(call_target_address,
5331 unoptimized_code)); 5327 unoptimized_code));
5332 return OSR_AFTER_STACK_CHECK; 5328 return OSR_AFTER_STACK_CHECK;
5333 } 5329 }
5334 5330
5335 5331
5336 } // namespace internal 5332 } // namespace internal
5337 } // namespace v8 5333 } // namespace v8
5338 5334
5339 #endif // V8_TARGET_ARCH_X64 5335 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698