OLD | NEW |
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 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 } else { | 295 } else { |
296 UNREACHABLE(); | 296 UNREACHABLE(); |
297 } | 297 } |
298 | 298 |
299 FillCache(isolate_, code); | 299 FillCache(isolate_, code); |
300 return code; | 300 return code; |
301 } | 301 } |
302 | 302 |
303 | 303 |
304 Handle<Code> StubCache::ComputeCompareNil(Handle<Map> receiver_map, | 304 Handle<Code> StubCache::ComputeCompareNil(Handle<Map> receiver_map, |
305 CompareNilICStub& stub) { | 305 CompareNilICStub* stub) { |
306 Handle<String> name(isolate_->heap()->empty_string()); | 306 Handle<String> name(isolate_->heap()->empty_string()); |
307 if (!receiver_map->is_shared()) { | 307 if (!receiver_map->is_shared()) { |
308 Handle<Code> cached_ic = FindIC(name, receiver_map, Code::COMPARE_NIL_IC, | 308 Handle<Code> cached_ic = FindIC(name, receiver_map, Code::COMPARE_NIL_IC, |
309 stub.GetExtraICState()); | 309 stub->GetExtraICState()); |
310 if (!cached_ic.is_null()) return cached_ic; | 310 if (!cached_ic.is_null()) return cached_ic; |
311 } | 311 } |
312 | 312 |
313 Code::FindAndReplacePattern pattern; | 313 Code::FindAndReplacePattern pattern; |
314 pattern.Add(isolate_->factory()->meta_map(), receiver_map); | 314 pattern.Add(isolate_->factory()->meta_map(), receiver_map); |
315 Handle<Code> ic = stub.GetCodeCopy(pattern); | 315 Handle<Code> ic = stub->GetCodeCopy(pattern); |
316 | 316 |
317 if (!receiver_map->is_shared()) { | 317 if (!receiver_map->is_shared()) { |
318 Map::UpdateCodeCache(receiver_map, name, ic); | 318 Map::UpdateCodeCache(receiver_map, name, ic); |
319 } | 319 } |
320 | 320 |
321 return ic; | 321 return ic; |
322 } | 322 } |
323 | 323 |
324 | 324 |
325 // TODO(verwaest): Change this method so it takes in a TypeHandleList. | 325 // TODO(verwaest): Change this method so it takes in a TypeHandleList. |
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1481 Handle<FunctionTemplateInfo>( | 1481 Handle<FunctionTemplateInfo>( |
1482 FunctionTemplateInfo::cast(signature->receiver())); | 1482 FunctionTemplateInfo::cast(signature->receiver())); |
1483 } | 1483 } |
1484 } | 1484 } |
1485 | 1485 |
1486 is_simple_api_call_ = true; | 1486 is_simple_api_call_ = true; |
1487 } | 1487 } |
1488 | 1488 |
1489 | 1489 |
1490 } } // namespace v8::internal | 1490 } } // namespace v8::internal |
OLD | NEW |