Chromium Code Reviews| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 323 iter.Advance(); | 323 iter.Advance(); |
| 324 } | 324 } |
| 325 if (!last.is_null()) set_holder(last); | 325 if (!last.is_null()) set_holder(last); |
| 326 NonexistentFrontendHeader(name, &miss, scratch1(), scratch2()); | 326 NonexistentFrontendHeader(name, &miss, scratch1(), scratch2()); |
| 327 } else { | 327 } else { |
| 328 FrontendHeader(receiver(), name, &miss); | 328 FrontendHeader(receiver(), name, &miss); |
| 329 DCHECK(holder()->HasFastProperties()); | 329 DCHECK(holder()->HasFastProperties()); |
| 330 } | 330 } |
| 331 | 331 |
| 332 int descriptor = transition->LastAdded(); | 332 int descriptor = transition->LastAdded(); |
| 333 DescriptorArray* descriptors = transition->instance_descriptors(); | 333 Handle<DescriptorArray> descriptors(transition->instance_descriptors()); |
|
ulan
2014/12/09 17:30:37
This is the only diff from the original CL. We nee
| |
| 334 PropertyDetails details = descriptors->GetDetails(descriptor); | 334 PropertyDetails details = descriptors->GetDetails(descriptor); |
| 335 Representation representation = details.representation(); | 335 Representation representation = details.representation(); |
| 336 DCHECK(!representation.IsNone()); | 336 DCHECK(!representation.IsNone()); |
| 337 | 337 |
| 338 // Stub is never generated for objects that require access checks. | 338 // Stub is never generated for objects that require access checks. |
| 339 DCHECK(!transition->is_access_check_needed()); | 339 DCHECK(!transition->is_access_check_needed()); |
| 340 | 340 |
| 341 // Call to respective StoreTransitionStub. | 341 // Call to respective StoreTransitionStub. |
| 342 if (details.type() == CONSTANT) { | 342 if (details.type() == CONSTANT) { |
| 343 GenerateConstantCheck(descriptors->GetValue(descriptor), value(), &miss); | |
| 344 | |
| 345 GenerateRestoreMap(transition, scratch2(), &miss); | 343 GenerateRestoreMap(transition, scratch2(), &miss); |
| 344 DCHECK(descriptors->GetValue(descriptor)->IsJSFunction()); | |
| 345 Register map_reg = StoreTransitionDescriptor::MapRegister(); | |
| 346 GenerateConstantCheck(map_reg, descriptor, value(), scratch2(), &miss); | |
| 346 GenerateRestoreName(name); | 347 GenerateRestoreName(name); |
| 347 StoreTransitionStub stub(isolate()); | 348 StoreTransitionStub stub(isolate()); |
| 348 GenerateTailCall(masm(), stub.GetCode()); | 349 GenerateTailCall(masm(), stub.GetCode()); |
| 349 | 350 |
| 350 } else { | 351 } else { |
| 351 if (representation.IsHeapObject()) { | 352 if (representation.IsHeapObject()) { |
| 352 GenerateFieldTypeChecks(descriptors->GetFieldType(descriptor), value(), | 353 GenerateFieldTypeChecks(descriptors->GetFieldType(descriptor), value(), |
| 353 &miss); | 354 &miss); |
| 354 } | 355 } |
| 355 StoreTransitionStub::StoreMode store_mode = | 356 StoreTransitionStub::StoreMode store_mode = |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 435 DCHECK(elements_kind == DICTIONARY_ELEMENTS); | 436 DCHECK(elements_kind == DICTIONARY_ELEMENTS); |
| 436 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); | 437 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); |
| 437 } | 438 } |
| 438 } | 439 } |
| 439 | 440 |
| 440 handlers->Add(cached_stub); | 441 handlers->Add(cached_stub); |
| 441 } | 442 } |
| 442 } | 443 } |
| 443 } | 444 } |
| 444 } // namespace v8::internal | 445 } // namespace v8::internal |
| OLD | NEW |