Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/objects.h

Issue 13728002: Add an IC for CompareNil operations (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix SunSpider regression Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4319 matching lines...) Expand 10 before | Expand all | Expand 10 after
4330 V(BUILTIN) \ 4330 V(BUILTIN) \
4331 V(LOAD_IC) \ 4331 V(LOAD_IC) \
4332 V(KEYED_LOAD_IC) \ 4332 V(KEYED_LOAD_IC) \
4333 V(CALL_IC) \ 4333 V(CALL_IC) \
4334 V(KEYED_CALL_IC) \ 4334 V(KEYED_CALL_IC) \
4335 V(STORE_IC) \ 4335 V(STORE_IC) \
4336 V(KEYED_STORE_IC) \ 4336 V(KEYED_STORE_IC) \
4337 V(UNARY_OP_IC) \ 4337 V(UNARY_OP_IC) \
4338 V(BINARY_OP_IC) \ 4338 V(BINARY_OP_IC) \
4339 V(COMPARE_IC) \ 4339 V(COMPARE_IC) \
4340 V(COMPARE_NIL_IC) \
4340 V(TO_BOOLEAN_IC) 4341 V(TO_BOOLEAN_IC)
4341 4342
4342 enum Kind { 4343 enum Kind {
4343 #define DEFINE_CODE_KIND_ENUM(name) name, 4344 #define DEFINE_CODE_KIND_ENUM(name) name,
4344 CODE_KIND_LIST(DEFINE_CODE_KIND_ENUM) 4345 CODE_KIND_LIST(DEFINE_CODE_KIND_ENUM)
4345 #undef DEFINE_CODE_KIND_ENUM 4346 #undef DEFINE_CODE_KIND_ENUM
4346 4347
4347 // Pseudo-kinds. 4348 // Pseudo-kinds.
4348 LAST_CODE_KIND = TO_BOOLEAN_IC, 4349 LAST_CODE_KIND = TO_BOOLEAN_IC,
4349 REGEXP = BUILTIN, 4350 REGEXP = BUILTIN,
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
4456 inline bool is_debug_break(); 4457 inline bool is_debug_break();
4457 inline bool is_load_stub() { return kind() == LOAD_IC; } 4458 inline bool is_load_stub() { return kind() == LOAD_IC; }
4458 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } 4459 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; }
4459 inline bool is_store_stub() { return kind() == STORE_IC; } 4460 inline bool is_store_stub() { return kind() == STORE_IC; }
4460 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } 4461 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; }
4461 inline bool is_call_stub() { return kind() == CALL_IC; } 4462 inline bool is_call_stub() { return kind() == CALL_IC; }
4462 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; } 4463 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; }
4463 inline bool is_unary_op_stub() { return kind() == UNARY_OP_IC; } 4464 inline bool is_unary_op_stub() { return kind() == UNARY_OP_IC; }
4464 inline bool is_binary_op_stub() { return kind() == BINARY_OP_IC; } 4465 inline bool is_binary_op_stub() { return kind() == BINARY_OP_IC; }
4465 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } 4466 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; }
4467 inline bool is_compare_nil_ic_stub() { return kind() == COMPARE_NIL_IC; }
4466 inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; } 4468 inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; }
4467 4469
4468 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. 4470 // [major_key]: For kind STUB or BINARY_OP_IC, the major key.
4469 inline int major_key(); 4471 inline int major_key();
4470 inline void set_major_key(int value); 4472 inline void set_major_key(int value);
4471 4473
4472 // For kind STUB or ICs, tells whether or not a code object was generated by 4474 // For kind STUB or ICs, tells whether or not a code object was generated by
4473 // the optimizing compiler (but it may not be an optimized function). 4475 // the optimizing compiler (but it may not be an optimized function).
4474 bool is_crankshafted(); 4476 bool is_crankshafted();
4475 inline void set_is_crankshafted(bool value); 4477 inline void set_is_crankshafted(bool value);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
4534 inline void set_check_type(CheckType value); 4536 inline void set_check_type(CheckType value);
4535 4537
4536 // [type-recording unary op type]: For kind UNARY_OP_IC. 4538 // [type-recording unary op type]: For kind UNARY_OP_IC.
4537 inline byte unary_op_type(); 4539 inline byte unary_op_type();
4538 inline void set_unary_op_type(byte value); 4540 inline void set_unary_op_type(byte value);
4539 4541
4540 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. 4542 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in.
4541 inline byte to_boolean_state(); 4543 inline byte to_boolean_state();
4542 inline void set_to_boolean_state(byte value); 4544 inline void set_to_boolean_state(byte value);
4543 4545
4546 // [compare_nil]: For kind COMPARE_NIL_IC tells what state the stub is in.
4547 inline byte compare_nil_state();
4548
4544 // [has_function_cache]: For kind STUB tells whether there is a function 4549 // [has_function_cache]: For kind STUB tells whether there is a function
4545 // cache is passed to the stub. 4550 // cache is passed to the stub.
4546 inline bool has_function_cache(); 4551 inline bool has_function_cache();
4547 inline void set_has_function_cache(bool flag); 4552 inline void set_has_function_cache(bool flag);
4548 4553
4549 4554
4550 // [marked_for_deoptimization]: For kind OPTIMIZED_FUNCTION tells whether 4555 // [marked_for_deoptimization]: For kind OPTIMIZED_FUNCTION tells whether
4551 // the code is going to be deoptimized because of dead embedded maps. 4556 // the code is going to be deoptimized because of dead embedded maps.
4552 inline bool marked_for_deoptimization(); 4557 inline bool marked_for_deoptimization();
4553 inline void set_marked_for_deoptimization(bool flag); 4558 inline void set_marked_for_deoptimization(bool flag);
4554 4559
4555 bool allowed_in_shared_map_code_cache(); 4560 bool allowed_in_shared_map_code_cache();
4556 4561
4557 // Get the safepoint entry for the given pc. 4562 // Get the safepoint entry for the given pc.
4558 SafepointEntry GetSafepointEntry(Address pc); 4563 SafepointEntry GetSafepointEntry(Address pc);
4559 4564
4560 // Find the first map in an IC stub. 4565 // Find the first map in an IC stub.
4561 Map* FindFirstMap(); 4566 Map* FindFirstMap();
4562 void FindAllMaps(MapHandleList* maps); 4567 void FindAllMaps(MapHandleList* maps);
4568 void ReplaceFirstMap(Map* replace);
4563 4569
4564 // Find the first code in an IC stub. 4570 // Find the first code in an IC stub.
4565 Code* FindFirstCode(); 4571 Code* FindFirstCode();
4566 void FindAllCode(CodeHandleList* code_list, int length); 4572 void FindAllCode(CodeHandleList* code_list, int length);
4567 4573
4568 class ExtraICStateStrictMode: public BitField<StrictModeFlag, 0, 1> {}; 4574 class ExtraICStateStrictMode: public BitField<StrictModeFlag, 0, 1> {};
4569 class ExtraICStateKeyedAccessStoreMode: 4575 class ExtraICStateKeyedAccessStoreMode:
4570 public BitField<KeyedAccessStoreMode, 1, 4> {}; // NOLINT 4576 public BitField<KeyedAccessStoreMode, 1, 4> {}; // NOLINT
4571 4577
4572 class ExtraICStateStubHolder: public BitField<StubHolder, 0, 1> {}; 4578 class ExtraICStateStubHolder: public BitField<StubHolder, 0, 1> {};
(...skipping 4832 matching lines...) Expand 10 before | Expand all | Expand 10 after
9405 } else { 9411 } else {
9406 value &= ~(1 << bit_position); 9412 value &= ~(1 << bit_position);
9407 } 9413 }
9408 return value; 9414 return value;
9409 } 9415 }
9410 }; 9416 };
9411 9417
9412 } } // namespace v8::internal 9418 } } // namespace v8::internal
9413 9419
9414 #endif // V8_OBJECTS_H_ 9420 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698