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

Side by Side Diff: src/x64/full-codegen-x64.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/runtime.cc ('k') | src/x64/lithium-codegen-x64.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-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 4425 matching lines...) Expand 10 before | Expand all | Expand 10 after
4436 Split(zero, if_true, if_false, fall_through); 4436 Split(zero, if_true, if_false, fall_through);
4437 } else if (String::Equals(check, factory->symbol_string())) { 4437 } else if (String::Equals(check, factory->symbol_string())) {
4438 __ JumpIfSmi(rax, if_false); 4438 __ JumpIfSmi(rax, if_false);
4439 __ CmpObjectType(rax, SYMBOL_TYPE, rdx); 4439 __ CmpObjectType(rax, SYMBOL_TYPE, rdx);
4440 Split(equal, if_true, if_false, fall_through); 4440 Split(equal, if_true, if_false, fall_through);
4441 } else if (String::Equals(check, factory->boolean_string())) { 4441 } else if (String::Equals(check, factory->boolean_string())) {
4442 __ CompareRoot(rax, Heap::kTrueValueRootIndex); 4442 __ CompareRoot(rax, Heap::kTrueValueRootIndex);
4443 __ j(equal, if_true); 4443 __ j(equal, if_true);
4444 __ CompareRoot(rax, Heap::kFalseValueRootIndex); 4444 __ CompareRoot(rax, Heap::kFalseValueRootIndex);
4445 Split(equal, if_true, if_false, fall_through); 4445 Split(equal, if_true, if_false, fall_through);
4446 } else if (FLAG_harmony_typeof &&
4447 String::Equals(check, factory->null_string())) {
4448 __ CompareRoot(rax, Heap::kNullValueRootIndex);
4449 Split(equal, if_true, if_false, fall_through);
4450 } else if (String::Equals(check, factory->undefined_string())) { 4446 } else if (String::Equals(check, factory->undefined_string())) {
4451 __ CompareRoot(rax, Heap::kUndefinedValueRootIndex); 4447 __ CompareRoot(rax, Heap::kUndefinedValueRootIndex);
4452 __ j(equal, if_true); 4448 __ j(equal, if_true);
4453 __ JumpIfSmi(rax, if_false); 4449 __ JumpIfSmi(rax, if_false);
4454 // Check for undetectable objects => true. 4450 // Check for undetectable objects => true.
4455 __ movp(rdx, FieldOperand(rax, HeapObject::kMapOffset)); 4451 __ movp(rdx, FieldOperand(rax, HeapObject::kMapOffset));
4456 __ testb(FieldOperand(rdx, Map::kBitFieldOffset), 4452 __ testb(FieldOperand(rdx, Map::kBitFieldOffset),
4457 Immediate(1 << Map::kIsUndetectable)); 4453 Immediate(1 << Map::kIsUndetectable));
4458 Split(not_zero, if_true, if_false, fall_through); 4454 Split(not_zero, if_true, if_false, fall_through);
4459 } else if (String::Equals(check, factory->function_string())) { 4455 } else if (String::Equals(check, factory->function_string())) {
4460 __ JumpIfSmi(rax, if_false); 4456 __ JumpIfSmi(rax, if_false);
4461 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); 4457 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2);
4462 __ CmpObjectType(rax, JS_FUNCTION_TYPE, rdx); 4458 __ CmpObjectType(rax, JS_FUNCTION_TYPE, rdx);
4463 __ j(equal, if_true); 4459 __ j(equal, if_true);
4464 __ CmpInstanceType(rdx, JS_FUNCTION_PROXY_TYPE); 4460 __ CmpInstanceType(rdx, JS_FUNCTION_PROXY_TYPE);
4465 Split(equal, if_true, if_false, fall_through); 4461 Split(equal, if_true, if_false, fall_through);
4466 } else if (String::Equals(check, factory->object_string())) { 4462 } else if (String::Equals(check, factory->object_string())) {
4467 __ JumpIfSmi(rax, if_false); 4463 __ JumpIfSmi(rax, if_false);
4468 if (!FLAG_harmony_typeof) { 4464 __ CompareRoot(rax, Heap::kNullValueRootIndex);
4469 __ CompareRoot(rax, Heap::kNullValueRootIndex); 4465 __ j(equal, if_true);
4470 __ j(equal, if_true);
4471 }
4472 __ CmpObjectType(rax, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, rdx); 4466 __ CmpObjectType(rax, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, rdx);
4473 __ j(below, if_false); 4467 __ j(below, if_false);
4474 __ CmpInstanceType(rdx, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); 4468 __ CmpInstanceType(rdx, LAST_NONCALLABLE_SPEC_OBJECT_TYPE);
4475 __ j(above, if_false); 4469 __ j(above, if_false);
4476 // Check for undetectable objects => false. 4470 // Check for undetectable objects => false.
4477 __ testb(FieldOperand(rdx, Map::kBitFieldOffset), 4471 __ testb(FieldOperand(rdx, Map::kBitFieldOffset),
4478 Immediate(1 << Map::kIsUndetectable)); 4472 Immediate(1 << Map::kIsUndetectable));
4479 Split(zero, if_true, if_false, fall_through); 4473 Split(zero, if_true, if_false, fall_through);
4480 } else { 4474 } else {
4481 if (if_false != fall_through) __ jmp(if_false); 4475 if (if_false != fall_through) __ jmp(if_false);
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
4806 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4800 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4807 Assembler::target_address_at(call_target_address, 4801 Assembler::target_address_at(call_target_address,
4808 unoptimized_code)); 4802 unoptimized_code));
4809 return OSR_AFTER_STACK_CHECK; 4803 return OSR_AFTER_STACK_CHECK;
4810 } 4804 }
4811 4805
4812 4806
4813 } } // namespace v8::internal 4807 } } // namespace v8::internal
4814 4808
4815 #endif // V8_TARGET_ARCH_X64 4809 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698