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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 DCHECK_NE(NULL, info->getter()); | 349 DCHECK_NE(NULL, info->getter()); |
350 GenerateLoadCallback(reg, info); | 350 GenerateLoadCallback(reg, info); |
351 } | 351 } |
352 } | 352 } |
353 | 353 |
354 | 354 |
355 Handle<Code> NamedLoadHandlerCompiler::CompileLoadViaGetter( | 355 Handle<Code> NamedLoadHandlerCompiler::CompileLoadViaGetter( |
356 Handle<Name> name, int accessor_index, int expected_arguments) { | 356 Handle<Name> name, int accessor_index, int expected_arguments) { |
357 Register holder = Frontend(name); | 357 Register holder = Frontend(name); |
358 GenerateLoadViaGetter(masm(), type(), receiver(), holder, accessor_index, | 358 GenerateLoadViaGetter(masm(), type(), receiver(), holder, accessor_index, |
359 expected_arguments); | 359 expected_arguments, scratch2()); |
360 return GetCode(kind(), Code::FAST, name); | 360 return GetCode(kind(), Code::FAST, name); |
361 } | 361 } |
362 | 362 |
363 | 363 |
364 // TODO(verwaest): Cleanup. holder() is actually the receiver. | 364 // TODO(verwaest): Cleanup. holder() is actually the receiver. |
365 Handle<Code> NamedStoreHandlerCompiler::CompileStoreTransition( | 365 Handle<Code> NamedStoreHandlerCompiler::CompileStoreTransition( |
366 Handle<Map> transition, Handle<Name> name) { | 366 Handle<Map> transition, Handle<Name> name) { |
367 Label miss; | 367 Label miss; |
368 | 368 |
369 // Check that we are allowed to write this. | 369 // Check that we are allowed to write this. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 TailCallBuiltin(masm(), MissBuiltin(kind())); | 439 TailCallBuiltin(masm(), MissBuiltin(kind())); |
440 return GetCode(kind(), Code::FAST, it->name()); | 440 return GetCode(kind(), Code::FAST, it->name()); |
441 } | 441 } |
442 | 442 |
443 | 443 |
444 Handle<Code> NamedStoreHandlerCompiler::CompileStoreViaSetter( | 444 Handle<Code> NamedStoreHandlerCompiler::CompileStoreViaSetter( |
445 Handle<JSObject> object, Handle<Name> name, int accessor_index, | 445 Handle<JSObject> object, Handle<Name> name, int accessor_index, |
446 int expected_arguments) { | 446 int expected_arguments) { |
447 Register holder = Frontend(name); | 447 Register holder = Frontend(name); |
448 GenerateStoreViaSetter(masm(), type(), receiver(), holder, accessor_index, | 448 GenerateStoreViaSetter(masm(), type(), receiver(), holder, accessor_index, |
449 expected_arguments); | 449 expected_arguments, scratch2()); |
450 | 450 |
451 return GetCode(kind(), Code::FAST, name); | 451 return GetCode(kind(), Code::FAST, name); |
452 } | 452 } |
453 | 453 |
454 | 454 |
455 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( | 455 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
456 Handle<JSObject> object, Handle<Name> name, | 456 Handle<JSObject> object, Handle<Name> name, |
457 const CallOptimization& call_optimization) { | 457 const CallOptimization& call_optimization) { |
458 Frontend(name); | 458 Frontend(name); |
459 GenerateApiAccessorCall(masm(), call_optimization, handle(object->map()), | 459 GenerateApiAccessorCall(masm(), call_optimization, handle(object->map()), |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 DCHECK(elements_kind == DICTIONARY_ELEMENTS); | 491 DCHECK(elements_kind == DICTIONARY_ELEMENTS); |
492 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); | 492 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); |
493 } | 493 } |
494 } | 494 } |
495 | 495 |
496 handlers->Add(cached_stub); | 496 handlers->Add(cached_stub); |
497 } | 497 } |
498 } | 498 } |
499 } | 499 } |
500 } // namespace v8::internal | 500 } // namespace v8::internal |
OLD | NEW |