Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1111 | 1111 |
| 1112 // Handle store cache miss. | 1112 // Handle store cache miss. |
| 1113 __ bind(&miss); | 1113 __ bind(&miss); |
| 1114 TailCallBuiltin(masm(), MissBuiltin(kind())); | 1114 TailCallBuiltin(masm(), MissBuiltin(kind())); |
| 1115 | 1115 |
| 1116 // Return the generated code. | 1116 // Return the generated code. |
| 1117 return GetCode(kind(), Code::FAST, name); | 1117 return GetCode(kind(), Code::FAST, name); |
| 1118 } | 1118 } |
| 1119 | 1119 |
| 1120 | 1120 |
| 1121 Handle<Code> StoreStubCompiler::CompileStoreArrayLength(Handle<JSObject> object, | |
| 1122 LookupResult* lookup, | |
| 1123 Handle<Name> name) { | |
| 1124 // This accepts as a receiver anything JSArray::SetElementsLength accepts | |
| 1125 // (currently anything except for external arrays which means anything with | |
| 1126 // elements of FixedArray type). Value must be a number, but only smis are | |
| 1127 // accepted as the most common case. | |
| 1128 Label miss; | |
| 1129 | |
| 1130 // It is not necessary to check object since all the necessary checks are | |
|
Toon Verwaest
2014/03/17 15:12:10
Remove this comment. This is true for all ICs.
Igor Sheludko
2014/03/17 15:43:17
Done.
| |
| 1131 // done at stub installation time. | |
| 1132 | |
| 1133 // Check that value is a smi. | |
| 1134 __ JumpIfNotSmi(value(), &miss); | |
| 1135 | |
| 1136 // Generate tail call to StoreIC_ArrayLength. | |
| 1137 GenerateStoreArrayLength(); | |
| 1138 | |
| 1139 // Handle miss case. | |
| 1140 __ bind(&miss); | |
| 1141 TailCallBuiltin(masm(), MissBuiltin(kind())); | |
| 1142 | |
| 1143 // Return the generated code. | |
| 1144 return GetCode(kind(), Code::FAST, name); | |
| 1145 } | |
| 1146 | |
| 1147 | |
| 1121 Handle<Code> StoreStubCompiler::CompileStoreViaSetter( | 1148 Handle<Code> StoreStubCompiler::CompileStoreViaSetter( |
| 1122 Handle<JSObject> object, | 1149 Handle<JSObject> object, |
| 1123 Handle<JSObject> holder, | 1150 Handle<JSObject> holder, |
| 1124 Handle<Name> name, | 1151 Handle<Name> name, |
| 1125 Handle<JSFunction> setter) { | 1152 Handle<JSFunction> setter) { |
| 1126 Handle<HeapType> type = IC::CurrentTypeOf(object, isolate()); | 1153 Handle<HeapType> type = IC::CurrentTypeOf(object, isolate()); |
| 1127 HandlerFrontend(type, receiver(), holder, name); | 1154 HandlerFrontend(type, receiver(), holder, name); |
| 1128 GenerateStoreViaSetter(masm(), type, receiver(), setter); | 1155 GenerateStoreViaSetter(masm(), type, receiver(), setter); |
| 1129 | 1156 |
| 1130 return GetCode(kind(), Code::FAST, name); | 1157 return GetCode(kind(), Code::FAST, name); |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1462 Handle<FunctionTemplateInfo>( | 1489 Handle<FunctionTemplateInfo>( |
| 1463 FunctionTemplateInfo::cast(signature->receiver())); | 1490 FunctionTemplateInfo::cast(signature->receiver())); |
| 1464 } | 1491 } |
| 1465 } | 1492 } |
| 1466 | 1493 |
| 1467 is_simple_api_call_ = true; | 1494 is_simple_api_call_ = true; |
| 1468 } | 1495 } |
| 1469 | 1496 |
| 1470 | 1497 |
| 1471 } } // namespace v8::internal | 1498 } } // namespace v8::internal |
| OLD | NEW |