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

Side by Side Diff: src/x87/full-codegen-x87.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/x64/lithium-codegen-x64.cc ('k') | src/x87/lithium-codegen-x87.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_X87 7 #if V8_TARGET_ARCH_X87
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 4411 matching lines...) Expand 10 before | Expand all | Expand 10 after
4422 Split(zero, if_true, if_false, fall_through); 4422 Split(zero, if_true, if_false, fall_through);
4423 } else if (String::Equals(check, factory->symbol_string())) { 4423 } else if (String::Equals(check, factory->symbol_string())) {
4424 __ JumpIfSmi(eax, if_false); 4424 __ JumpIfSmi(eax, if_false);
4425 __ CmpObjectType(eax, SYMBOL_TYPE, edx); 4425 __ CmpObjectType(eax, SYMBOL_TYPE, edx);
4426 Split(equal, if_true, if_false, fall_through); 4426 Split(equal, if_true, if_false, fall_through);
4427 } else if (String::Equals(check, factory->boolean_string())) { 4427 } else if (String::Equals(check, factory->boolean_string())) {
4428 __ cmp(eax, isolate()->factory()->true_value()); 4428 __ cmp(eax, isolate()->factory()->true_value());
4429 __ j(equal, if_true); 4429 __ j(equal, if_true);
4430 __ cmp(eax, isolate()->factory()->false_value()); 4430 __ cmp(eax, isolate()->factory()->false_value());
4431 Split(equal, if_true, if_false, fall_through); 4431 Split(equal, if_true, if_false, fall_through);
4432 } else if (FLAG_harmony_typeof &&
4433 String::Equals(check, factory->null_string())) {
4434 __ cmp(eax, isolate()->factory()->null_value());
4435 Split(equal, if_true, if_false, fall_through);
4436 } else if (String::Equals(check, factory->undefined_string())) { 4432 } else if (String::Equals(check, factory->undefined_string())) {
4437 __ cmp(eax, isolate()->factory()->undefined_value()); 4433 __ cmp(eax, isolate()->factory()->undefined_value());
4438 __ j(equal, if_true); 4434 __ j(equal, if_true);
4439 __ JumpIfSmi(eax, if_false); 4435 __ JumpIfSmi(eax, if_false);
4440 // Check for undetectable objects => true. 4436 // Check for undetectable objects => true.
4441 __ mov(edx, FieldOperand(eax, HeapObject::kMapOffset)); 4437 __ mov(edx, FieldOperand(eax, HeapObject::kMapOffset));
4442 __ movzx_b(ecx, FieldOperand(edx, Map::kBitFieldOffset)); 4438 __ movzx_b(ecx, FieldOperand(edx, Map::kBitFieldOffset));
4443 __ test(ecx, Immediate(1 << Map::kIsUndetectable)); 4439 __ test(ecx, Immediate(1 << Map::kIsUndetectable));
4444 Split(not_zero, if_true, if_false, fall_through); 4440 Split(not_zero, if_true, if_false, fall_through);
4445 } else if (String::Equals(check, factory->function_string())) { 4441 } else if (String::Equals(check, factory->function_string())) {
4446 __ JumpIfSmi(eax, if_false); 4442 __ JumpIfSmi(eax, if_false);
4447 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); 4443 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2);
4448 __ CmpObjectType(eax, JS_FUNCTION_TYPE, edx); 4444 __ CmpObjectType(eax, JS_FUNCTION_TYPE, edx);
4449 __ j(equal, if_true); 4445 __ j(equal, if_true);
4450 __ CmpInstanceType(edx, JS_FUNCTION_PROXY_TYPE); 4446 __ CmpInstanceType(edx, JS_FUNCTION_PROXY_TYPE);
4451 Split(equal, if_true, if_false, fall_through); 4447 Split(equal, if_true, if_false, fall_through);
4452 } else if (String::Equals(check, factory->object_string())) { 4448 } else if (String::Equals(check, factory->object_string())) {
4453 __ JumpIfSmi(eax, if_false); 4449 __ JumpIfSmi(eax, if_false);
4454 if (!FLAG_harmony_typeof) { 4450 __ cmp(eax, isolate()->factory()->null_value());
4455 __ cmp(eax, isolate()->factory()->null_value()); 4451 __ j(equal, if_true);
4456 __ j(equal, if_true);
4457 }
4458 __ CmpObjectType(eax, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, edx); 4452 __ CmpObjectType(eax, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, edx);
4459 __ j(below, if_false); 4453 __ j(below, if_false);
4460 __ CmpInstanceType(edx, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); 4454 __ CmpInstanceType(edx, LAST_NONCALLABLE_SPEC_OBJECT_TYPE);
4461 __ j(above, if_false); 4455 __ j(above, if_false);
4462 // Check for undetectable objects => false. 4456 // Check for undetectable objects => false.
4463 __ test_b(FieldOperand(edx, Map::kBitFieldOffset), 4457 __ test_b(FieldOperand(edx, Map::kBitFieldOffset),
4464 1 << Map::kIsUndetectable); 4458 1 << Map::kIsUndetectable);
4465 Split(zero, if_true, if_false, fall_through); 4459 Split(zero, if_true, if_false, fall_through);
4466 } else { 4460 } else {
4467 if (if_false != fall_through) __ jmp(if_false); 4461 if (if_false != fall_through) __ jmp(if_false);
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
4789 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4783 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4790 Assembler::target_address_at(call_target_address, 4784 Assembler::target_address_at(call_target_address,
4791 unoptimized_code)); 4785 unoptimized_code));
4792 return OSR_AFTER_STACK_CHECK; 4786 return OSR_AFTER_STACK_CHECK;
4793 } 4787 }
4794 4788
4795 4789
4796 } } // namespace v8::internal 4790 } } // namespace v8::internal
4797 4791
4798 #endif // V8_TARGET_ARCH_X87 4792 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698