OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
237 | 237 |
238 OS::SNPrintF(Vector<char>(name_, kMaxNameLength), | 238 OS::SNPrintF(Vector<char>(name_, kMaxNameLength), |
239 "InstanceofStub%s%s%s", | 239 "InstanceofStub%s%s%s", |
240 args, | 240 args, |
241 inline_check, | 241 inline_check, |
242 return_true_false_object); | 242 return_true_false_object); |
243 return name_; | 243 return name_; |
244 } | 244 } |
245 | 245 |
246 | 246 |
247 void KeyedLoadFastElementStub::Generate(MacroAssembler* masm) { | 247 void KeyedLoadElementStub::Generate(MacroAssembler* masm) { |
248 KeyedLoadStubCompiler::GenerateLoadFastElement(masm); | 248 switch (elements_kind_) { |
249 case JSObject::FAST_ELEMENTS: | |
Jakob Kummerow
2011/07/07 13:55:38
nit: indent "case" lines inside "switch" statement
danno
2011/07/08 11:00:24
Done.
| |
250 KeyedLoadStubCompiler::GenerateLoadFastElement(masm); | |
251 break; | |
252 case JSObject::FAST_DOUBLE_ELEMENTS: | |
253 UNIMPLEMENTED(); | |
254 break; | |
255 case JSObject::EXTERNAL_BYTE_ELEMENTS: | |
256 case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | |
257 case JSObject::EXTERNAL_SHORT_ELEMENTS: | |
258 case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | |
259 case JSObject::EXTERNAL_INT_ELEMENTS: | |
260 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: | |
261 case JSObject::EXTERNAL_FLOAT_ELEMENTS: | |
262 case JSObject::EXTERNAL_DOUBLE_ELEMENTS: | |
263 case JSObject::EXTERNAL_PIXEL_ELEMENTS: | |
264 KeyedLoadStubCompiler::GenerateLoadExternalArray(masm, elements_kind_); | |
265 break; | |
266 case JSObject::DICTIONARY_ELEMENTS: | |
267 KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm); | |
268 break; | |
269 case JSObject::NON_STRICT_ARGUMENTS_ELEMENTS: | |
270 UNREACHABLE(); | |
271 break; | |
272 } | |
249 } | 273 } |
250 | 274 |
251 | 275 |
252 void KeyedStoreFastElementStub::Generate(MacroAssembler* masm) { | 276 void KeyedStoreElementStub::Generate(MacroAssembler* masm) { |
253 KeyedStoreStubCompiler::GenerateStoreFastElement(masm, is_js_array_); | 277 switch (elements_kind_) { |
278 case JSObject::FAST_ELEMENTS: | |
Jakob Kummerow
2011/07/07 13:55:38
Same indentation nit here.
danno
2011/07/08 11:00:24
Done.
| |
279 KeyedStoreStubCompiler::GenerateStoreFastElement(masm, is_js_array_); | |
280 break; | |
281 case JSObject::FAST_DOUBLE_ELEMENTS: | |
282 UNIMPLEMENTED(); | |
283 break; | |
284 case JSObject::EXTERNAL_BYTE_ELEMENTS: | |
285 case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | |
286 case JSObject::EXTERNAL_SHORT_ELEMENTS: | |
287 case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | |
288 case JSObject::EXTERNAL_INT_ELEMENTS: | |
289 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: | |
290 case JSObject::EXTERNAL_FLOAT_ELEMENTS: | |
291 case JSObject::EXTERNAL_DOUBLE_ELEMENTS: | |
292 case JSObject::EXTERNAL_PIXEL_ELEMENTS: | |
293 KeyedStoreStubCompiler::GenerateStoreExternalArray(masm, elements_kind_); | |
294 break; | |
295 case JSObject::DICTIONARY_ELEMENTS: | |
296 KeyedStoreStubCompiler::GenerateStoreDictionaryElement(masm); | |
297 break; | |
298 case JSObject::NON_STRICT_ARGUMENTS_ELEMENTS: | |
299 UNREACHABLE(); | |
300 break; | |
301 } | |
254 } | 302 } |
255 | 303 |
256 | 304 |
257 void KeyedLoadExternalArrayStub::Generate(MacroAssembler* masm) { | |
258 KeyedLoadStubCompiler::GenerateLoadExternalArray(masm, elements_kind_); | |
259 } | |
260 | |
261 | |
262 void KeyedStoreExternalArrayStub::Generate(MacroAssembler* masm) { | |
263 KeyedStoreStubCompiler::GenerateStoreExternalArray(masm, elements_kind_); | |
264 } | |
265 | |
266 | |
267 } } // namespace v8::internal | 305 } } // namespace v8::internal |
OLD | NEW |