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

Side by Side Diff: src/stub-cache.cc

Issue 269343003: Remove GenerateBooleanCheck() since we have a boolean map now. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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/stub-cache.h ('k') | src/x64/stub-cache-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 "v8.h" 5 #include "v8.h"
6 6
7 #include "api.h" 7 #include "api.h"
8 #include "arguments.h" 8 #include "arguments.h"
9 #include "ast.h" 9 #include "ast.h"
10 #include "code-stubs.h" 10 #include "code-stubs.h"
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 Label* miss) { 777 Label* miss) {
778 PrototypeCheckType check_type = CHECK_ALL_MAPS; 778 PrototypeCheckType check_type = CHECK_ALL_MAPS;
779 int function_index = -1; 779 int function_index = -1;
780 if (type->Is(HeapType::String())) { 780 if (type->Is(HeapType::String())) {
781 function_index = Context::STRING_FUNCTION_INDEX; 781 function_index = Context::STRING_FUNCTION_INDEX;
782 } else if (type->Is(HeapType::Symbol())) { 782 } else if (type->Is(HeapType::Symbol())) {
783 function_index = Context::SYMBOL_FUNCTION_INDEX; 783 function_index = Context::SYMBOL_FUNCTION_INDEX;
784 } else if (type->Is(HeapType::Number())) { 784 } else if (type->Is(HeapType::Number())) {
785 function_index = Context::NUMBER_FUNCTION_INDEX; 785 function_index = Context::NUMBER_FUNCTION_INDEX;
786 } else if (type->Is(HeapType::Boolean())) { 786 } else if (type->Is(HeapType::Boolean())) {
787 // Booleans use the generic oddball map, so an additional check is needed to
788 // ensure the receiver is really a boolean.
789 GenerateBooleanCheck(object_reg, miss);
790 function_index = Context::BOOLEAN_FUNCTION_INDEX; 787 function_index = Context::BOOLEAN_FUNCTION_INDEX;
791 } else { 788 } else {
792 check_type = SKIP_RECEIVER; 789 check_type = SKIP_RECEIVER;
793 } 790 }
794 791
795 if (check_type == CHECK_ALL_MAPS) { 792 if (check_type == CHECK_ALL_MAPS) {
796 GenerateDirectLoadGlobalFunctionPrototype( 793 GenerateDirectLoadGlobalFunctionPrototype(
797 masm(), function_index, scratch1(), miss); 794 masm(), function_index, scratch1(), miss);
798 Object* function = isolate()->native_context()->get(function_index); 795 Object* function = isolate()->native_context()->get(function_index);
799 Object* prototype = JSFunction::cast(function)->instance_prototype(); 796 Object* prototype = JSFunction::cast(function)->instance_prototype();
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 Handle<FunctionTemplateInfo>( 1481 Handle<FunctionTemplateInfo>(
1485 FunctionTemplateInfo::cast(signature->receiver())); 1482 FunctionTemplateInfo::cast(signature->receiver()));
1486 } 1483 }
1487 } 1484 }
1488 1485
1489 is_simple_api_call_ = true; 1486 is_simple_api_call_ = true;
1490 } 1487 }
1491 1488
1492 1489
1493 } } // namespace v8::internal 1490 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698