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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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/ia32/full-codegen-ia32.cc ('k') | src/mips/full-codegen-mips.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_IA32 7 #if V8_TARGET_ARCH_IA32
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 5302 matching lines...) Expand 10 before | Expand all | Expand 10 after
5313 __ JumpIfSmi(input, false_label, false_distance); 5313 __ JumpIfSmi(input, false_label, false_distance);
5314 __ CmpObjectType(input, SYMBOL_TYPE, input); 5314 __ CmpObjectType(input, SYMBOL_TYPE, input);
5315 final_branch_condition = equal; 5315 final_branch_condition = equal;
5316 5316
5317 } else if (String::Equals(type_name, factory()->boolean_string())) { 5317 } else if (String::Equals(type_name, factory()->boolean_string())) {
5318 __ cmp(input, factory()->true_value()); 5318 __ cmp(input, factory()->true_value());
5319 __ j(equal, true_label, true_distance); 5319 __ j(equal, true_label, true_distance);
5320 __ cmp(input, factory()->false_value()); 5320 __ cmp(input, factory()->false_value());
5321 final_branch_condition = equal; 5321 final_branch_condition = equal;
5322 5322
5323 } else if (FLAG_harmony_typeof &&
5324 String::Equals(type_name, factory()->null_string())) {
5325 __ cmp(input, factory()->null_value());
5326 final_branch_condition = equal;
5327
5328 } else if (String::Equals(type_name, factory()->undefined_string())) { 5323 } else if (String::Equals(type_name, factory()->undefined_string())) {
5329 __ cmp(input, factory()->undefined_value()); 5324 __ cmp(input, factory()->undefined_value());
5330 __ j(equal, true_label, true_distance); 5325 __ j(equal, true_label, true_distance);
5331 __ JumpIfSmi(input, false_label, false_distance); 5326 __ JumpIfSmi(input, false_label, false_distance);
5332 // Check for undetectable objects => true. 5327 // Check for undetectable objects => true.
5333 __ mov(input, FieldOperand(input, HeapObject::kMapOffset)); 5328 __ mov(input, FieldOperand(input, HeapObject::kMapOffset));
5334 __ test_b(FieldOperand(input, Map::kBitFieldOffset), 5329 __ test_b(FieldOperand(input, Map::kBitFieldOffset),
5335 1 << Map::kIsUndetectable); 5330 1 << Map::kIsUndetectable);
5336 final_branch_condition = not_zero; 5331 final_branch_condition = not_zero;
5337 5332
5338 } else if (String::Equals(type_name, factory()->function_string())) { 5333 } else if (String::Equals(type_name, factory()->function_string())) {
5339 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); 5334 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2);
5340 __ JumpIfSmi(input, false_label, false_distance); 5335 __ JumpIfSmi(input, false_label, false_distance);
5341 __ CmpObjectType(input, JS_FUNCTION_TYPE, input); 5336 __ CmpObjectType(input, JS_FUNCTION_TYPE, input);
5342 __ j(equal, true_label, true_distance); 5337 __ j(equal, true_label, true_distance);
5343 __ CmpInstanceType(input, JS_FUNCTION_PROXY_TYPE); 5338 __ CmpInstanceType(input, JS_FUNCTION_PROXY_TYPE);
5344 final_branch_condition = equal; 5339 final_branch_condition = equal;
5345 5340
5346 } else if (String::Equals(type_name, factory()->object_string())) { 5341 } else if (String::Equals(type_name, factory()->object_string())) {
5347 __ JumpIfSmi(input, false_label, false_distance); 5342 __ JumpIfSmi(input, false_label, false_distance);
5348 if (!FLAG_harmony_typeof) { 5343 __ cmp(input, factory()->null_value());
5349 __ cmp(input, factory()->null_value()); 5344 __ j(equal, true_label, true_distance);
5350 __ j(equal, true_label, true_distance);
5351 }
5352 __ CmpObjectType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, input); 5345 __ CmpObjectType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, input);
5353 __ j(below, false_label, false_distance); 5346 __ j(below, false_label, false_distance);
5354 __ CmpInstanceType(input, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); 5347 __ CmpInstanceType(input, LAST_NONCALLABLE_SPEC_OBJECT_TYPE);
5355 __ j(above, false_label, false_distance); 5348 __ j(above, false_label, false_distance);
5356 // Check for undetectable objects => false. 5349 // Check for undetectable objects => false.
5357 __ test_b(FieldOperand(input, Map::kBitFieldOffset), 5350 __ test_b(FieldOperand(input, Map::kBitFieldOffset),
5358 1 << Map::kIsUndetectable); 5351 1 << Map::kIsUndetectable);
5359 final_branch_condition = zero; 5352 final_branch_condition = zero;
5360 5353
5361 } else { 5354 } else {
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
5662 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5655 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5663 RecordSafepoint(Safepoint::kNoLazyDeopt); 5656 RecordSafepoint(Safepoint::kNoLazyDeopt);
5664 } 5657 }
5665 5658
5666 5659
5667 #undef __ 5660 #undef __
5668 5661
5669 } } // namespace v8::internal 5662 } } // namespace v8::internal
5670 5663
5671 #endif // V8_TARGET_ARCH_IA32 5664 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698