OLD | NEW |
1 // Copyright 2011 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 |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 if (object->IsHeapObject()) { | 244 if (object->IsHeapObject()) { |
245 LoadHeapObject(result, Handle<HeapObject>::cast(object)); | 245 LoadHeapObject(result, Handle<HeapObject>::cast(object)); |
246 } else { | 246 } else { |
247 Set(result, Immediate(object)); | 247 Set(result, Immediate(object)); |
248 } | 248 } |
249 } | 249 } |
250 | 250 |
251 // --------------------------------------------------------------------------- | 251 // --------------------------------------------------------------------------- |
252 // JavaScript invokes | 252 // JavaScript invokes |
253 | 253 |
254 // Setup call kind marking in ecx. The method takes ecx as an | 254 // Set up call kind marking in ecx. The method takes ecx as an |
255 // explicit first parameter to make the code more readable at the | 255 // explicit first parameter to make the code more readable at the |
256 // call sites. | 256 // call sites. |
257 void SetCallKind(Register dst, CallKind kind); | 257 void SetCallKind(Register dst, CallKind kind); |
258 | 258 |
259 // Invoke the JavaScript function code by either calling or jumping. | 259 // Invoke the JavaScript function code by either calling or jumping. |
260 void InvokeCode(Register code, | 260 void InvokeCode(Register code, |
261 const ParameterCount& expected, | 261 const ParameterCount& expected, |
262 const ParameterCount& actual, | 262 const ParameterCount& actual, |
263 InvokeFlag flag, | 263 InvokeFlag flag, |
264 const CallWrapper& call_wrapper, | 264 const CallWrapper& call_wrapper, |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 // FastDoubleElements. If it can, store it at the index specified by key in | 349 // FastDoubleElements. If it can, store it at the index specified by key in |
350 // the FastDoubleElements array elements, otherwise jump to fail. | 350 // the FastDoubleElements array elements, otherwise jump to fail. |
351 void StoreNumberToDoubleElements(Register maybe_number, | 351 void StoreNumberToDoubleElements(Register maybe_number, |
352 Register elements, | 352 Register elements, |
353 Register key, | 353 Register key, |
354 Register scratch1, | 354 Register scratch1, |
355 XMMRegister scratch2, | 355 XMMRegister scratch2, |
356 Label* fail, | 356 Label* fail, |
357 bool specialize_for_processor); | 357 bool specialize_for_processor); |
358 | 358 |
| 359 // Compare an object's map with the specified map and its transitioned |
| 360 // elements maps if mode is ALLOW_ELEMENT_TRANSITION_MAPS. FLAGS are set with |
| 361 // result of map compare. If multiple map compares are required, the compare |
| 362 // sequences branches to early_success. |
| 363 void CompareMap(Register obj, |
| 364 Handle<Map> map, |
| 365 Label* early_success, |
| 366 CompareMapMode mode = REQUIRE_EXACT_MAP); |
| 367 |
359 // Check if the map of an object is equal to a specified map and branch to | 368 // Check if the map of an object is equal to a specified map and branch to |
360 // label if not. Skip the smi check if not required (object is known to be a | 369 // label if not. Skip the smi check if not required (object is known to be a |
361 // heap object) | 370 // heap object). If mode is ALLOW_ELEMENT_TRANSITION_MAPS, then also match |
| 371 // against maps that are ElementsKind transition maps of the specificed map. |
362 void CheckMap(Register obj, | 372 void CheckMap(Register obj, |
363 Handle<Map> map, | 373 Handle<Map> map, |
364 Label* fail, | 374 Label* fail, |
365 SmiCheckType smi_check_type); | 375 SmiCheckType smi_check_type, |
| 376 CompareMapMode mode = REQUIRE_EXACT_MAP); |
366 | 377 |
367 // Check if the map of an object is equal to a specified map and branch to a | 378 // Check if the map of an object is equal to a specified map and branch to a |
368 // specified target if equal. Skip the smi check if not required (object is | 379 // specified target if equal. Skip the smi check if not required (object is |
369 // known to be a heap object) | 380 // known to be a heap object) |
370 void DispatchMap(Register obj, | 381 void DispatchMap(Register obj, |
371 Handle<Map> map, | 382 Handle<Map> map, |
372 Handle<Code> success, | 383 Handle<Code> success, |
373 SmiCheckType smi_check_type); | 384 SmiCheckType smi_check_type); |
374 | 385 |
375 // Check if the object in register heap_object is a string. Afterwards the | 386 // Check if the object in register heap_object is a string. Afterwards the |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 // --------------------------------------------------------------------------- | 490 // --------------------------------------------------------------------------- |
480 // Inline caching support | 491 // Inline caching support |
481 | 492 |
482 // Generate code for checking access rights - used for security checks | 493 // Generate code for checking access rights - used for security checks |
483 // on access to global objects across environments. The holder register | 494 // on access to global objects across environments. The holder register |
484 // is left untouched, but the scratch register is clobbered. | 495 // is left untouched, but the scratch register is clobbered. |
485 void CheckAccessGlobalProxy(Register holder_reg, | 496 void CheckAccessGlobalProxy(Register holder_reg, |
486 Register scratch, | 497 Register scratch, |
487 Label* miss); | 498 Label* miss); |
488 | 499 |
| 500 void GetNumberHash(Register r0, Register scratch); |
489 | 501 |
490 void LoadFromNumberDictionary(Label* miss, | 502 void LoadFromNumberDictionary(Label* miss, |
491 Register elements, | 503 Register elements, |
492 Register key, | 504 Register key, |
493 Register r0, | 505 Register r0, |
494 Register r1, | 506 Register r1, |
495 Register r2, | 507 Register r2, |
496 Register result); | 508 Register result); |
497 | 509 |
498 | 510 |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 } \ | 949 } \ |
938 masm-> | 950 masm-> |
939 #else | 951 #else |
940 #define ACCESS_MASM(masm) masm-> | 952 #define ACCESS_MASM(masm) masm-> |
941 #endif | 953 #endif |
942 | 954 |
943 | 955 |
944 } } // namespace v8::internal | 956 } } // namespace v8::internal |
945 | 957 |
946 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 958 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |