| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1382 __ bind(&miss); | 1382 __ bind(&miss); |
| 1383 __ IncrementCounter(&Counters::named_store_global_inline_miss, 1, r4, r3); | 1383 __ IncrementCounter(&Counters::named_store_global_inline_miss, 1, r4, r3); |
| 1384 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); | 1384 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); |
| 1385 __ Jump(ic, RelocInfo::CODE_TARGET); | 1385 __ Jump(ic, RelocInfo::CODE_TARGET); |
| 1386 | 1386 |
| 1387 // Return the generated code. | 1387 // Return the generated code. |
| 1388 return GetCode(NORMAL, name); | 1388 return GetCode(NORMAL, name); |
| 1389 } | 1389 } |
| 1390 | 1390 |
| 1391 | 1391 |
| 1392 Object* LoadStubCompiler::CompileLoadNonexistent(JSObject* object) { | |
| 1393 // ----------- S t a t e ------------- | |
| 1394 // -- r2 : name | |
| 1395 // -- lr : return address | |
| 1396 // -- [sp] : receiver | |
| 1397 // ----------------------------------- | |
| 1398 Label miss; | |
| 1399 | |
| 1400 // Load receiver. | |
| 1401 __ ldr(r0, MemOperand(sp, 0)); | |
| 1402 | |
| 1403 // Check the maps of the full prototype chain. | |
| 1404 JSObject* last = object; | |
| 1405 while (last->GetPrototype() != Heap::null_value()) { | |
| 1406 last = JSObject::cast(last->GetPrototype()); | |
| 1407 } | |
| 1408 CheckPrototypes(object, r0, last, r3, r1, Heap::empty_string(), &miss); | |
| 1409 | |
| 1410 // Return undefined if maps of the full prototype chain is still the same. | |
| 1411 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); | |
| 1412 __ Ret(); | |
| 1413 | |
| 1414 __ bind(&miss); | |
| 1415 GenerateLoadMiss(masm(), Code::LOAD_IC); | |
| 1416 | |
| 1417 // Return the generated code. | |
| 1418 return GetCode(NONEXISTENT, Heap::empty_string()); | |
| 1419 } | |
| 1420 | |
| 1421 | |
| 1422 Object* LoadStubCompiler::CompileLoadField(JSObject* object, | 1392 Object* LoadStubCompiler::CompileLoadField(JSObject* object, |
| 1423 JSObject* holder, | 1393 JSObject* holder, |
| 1424 int index, | 1394 int index, |
| 1425 String* name) { | 1395 String* name) { |
| 1426 // ----------- S t a t e ------------- | 1396 // ----------- S t a t e ------------- |
| 1427 // -- r2 : name | 1397 // -- r2 : name |
| 1428 // -- lr : return address | 1398 // -- lr : return address |
| 1429 // -- [sp] : receiver | 1399 // -- [sp] : receiver |
| 1430 // ----------------------------------- | 1400 // ----------------------------------- |
| 1431 Label miss; | 1401 Label miss; |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1923 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 1893 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
| 1924 | 1894 |
| 1925 // Return the generated code. | 1895 // Return the generated code. |
| 1926 return GetCode(); | 1896 return GetCode(); |
| 1927 } | 1897 } |
| 1928 | 1898 |
| 1929 | 1899 |
| 1930 #undef __ | 1900 #undef __ |
| 1931 | 1901 |
| 1932 } } // namespace v8::internal | 1902 } } // namespace v8::internal |
| OLD | NEW |