| 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 // Check that value is a smi. |
| 1131 __ JumpIfNotSmi(value(), &miss); |
| 1132 |
| 1133 // Generate tail call to StoreIC_ArrayLength. |
| 1134 GenerateStoreArrayLength(); |
| 1135 |
| 1136 // Handle miss case. |
| 1137 __ bind(&miss); |
| 1138 TailCallBuiltin(masm(), MissBuiltin(kind())); |
| 1139 |
| 1140 // Return the generated code. |
| 1141 return GetCode(kind(), Code::FAST, name); |
| 1142 } |
| 1143 |
| 1144 |
| 1121 Handle<Code> StoreStubCompiler::CompileStoreViaSetter( | 1145 Handle<Code> StoreStubCompiler::CompileStoreViaSetter( |
| 1122 Handle<JSObject> object, | 1146 Handle<JSObject> object, |
| 1123 Handle<JSObject> holder, | 1147 Handle<JSObject> holder, |
| 1124 Handle<Name> name, | 1148 Handle<Name> name, |
| 1125 Handle<JSFunction> setter) { | 1149 Handle<JSFunction> setter) { |
| 1126 Handle<HeapType> type = IC::CurrentTypeOf(object, isolate()); | 1150 Handle<HeapType> type = IC::CurrentTypeOf(object, isolate()); |
| 1127 HandlerFrontend(type, receiver(), holder, name); | 1151 HandlerFrontend(type, receiver(), holder, name); |
| 1128 GenerateStoreViaSetter(masm(), type, receiver(), setter); | 1152 GenerateStoreViaSetter(masm(), type, receiver(), setter); |
| 1129 | 1153 |
| 1130 return GetCode(kind(), Code::FAST, name); | 1154 return GetCode(kind(), Code::FAST, name); |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1462 Handle<FunctionTemplateInfo>( | 1486 Handle<FunctionTemplateInfo>( |
| 1463 FunctionTemplateInfo::cast(signature->receiver())); | 1487 FunctionTemplateInfo::cast(signature->receiver())); |
| 1464 } | 1488 } |
| 1465 } | 1489 } |
| 1466 | 1490 |
| 1467 is_simple_api_call_ = true; | 1491 is_simple_api_call_ = true; |
| 1468 } | 1492 } |
| 1469 | 1493 |
| 1470 | 1494 |
| 1471 } } // namespace v8::internal | 1495 } } // namespace v8::internal |
| OLD | NEW |