OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/ic/call-optimization.h" | 7 #include "src/ic/call-optimization.h" |
8 #include "src/ic/handler-compiler.h" | 8 #include "src/ic/handler-compiler.h" |
9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
10 #include "src/ic/ic-inl.h" | 10 #include "src/ic/ic-inl.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 } else if (type()->Is(HeapType::Number())) { | 99 } else if (type()->Is(HeapType::Number())) { |
100 function_index = Context::NUMBER_FUNCTION_INDEX; | 100 function_index = Context::NUMBER_FUNCTION_INDEX; |
101 } else if (type()->Is(HeapType::Boolean())) { | 101 } else if (type()->Is(HeapType::Boolean())) { |
102 function_index = Context::BOOLEAN_FUNCTION_INDEX; | 102 function_index = Context::BOOLEAN_FUNCTION_INDEX; |
103 } else { | 103 } else { |
104 check_type = SKIP_RECEIVER; | 104 check_type = SKIP_RECEIVER; |
105 } | 105 } |
106 | 106 |
107 if (check_type == CHECK_ALL_MAPS) { | 107 if (check_type == CHECK_ALL_MAPS) { |
108 GenerateDirectLoadGlobalFunctionPrototype(masm(), function_index, | 108 GenerateDirectLoadGlobalFunctionPrototype(masm(), function_index, |
109 scratch1(), miss); | 109 scratch1(), scratch2(), miss); |
110 Object* function = isolate()->native_context()->get(function_index); | 110 Object* function = isolate()->native_context()->get(function_index); |
111 Object* prototype = JSFunction::cast(function)->instance_prototype(); | 111 Object* prototype = JSFunction::cast(function)->instance_prototype(); |
112 set_type_for_object(handle(prototype, isolate())); | 112 set_type_for_object(handle(prototype, isolate())); |
113 object_reg = scratch1(); | 113 object_reg = scratch1(); |
114 } | 114 } |
115 | 115 |
116 // Check that the maps starting from the prototype haven't changed. | 116 // Check that the maps starting from the prototype haven't changed. |
117 return CheckPrototypes(object_reg, scratch1(), scratch2(), scratch3(), name, | 117 return CheckPrototypes(object_reg, scratch1(), scratch2(), scratch3(), name, |
118 miss, check_type); | 118 miss, check_type); |
119 } | 119 } |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 DCHECK(elements_kind == DICTIONARY_ELEMENTS); | 436 DCHECK(elements_kind == DICTIONARY_ELEMENTS); |
437 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); | 437 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); |
438 } | 438 } |
439 } | 439 } |
440 | 440 |
441 handlers->Add(cached_stub); | 441 handlers->Add(cached_stub); |
442 } | 442 } |
443 } | 443 } |
444 } | 444 } |
445 } // namespace v8::internal | 445 } // namespace v8::internal |
OLD | NEW |