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

Side by Side Diff: src/objects.h

Issue 13552003: Add extra flag for load-ic stubs in code cache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « no previous file | src/stub-cache.h » ('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 4334 matching lines...) Expand 10 before | Expand all | Expand 10 after
4345 enum StubType { 4345 enum StubType {
4346 NORMAL, 4346 NORMAL,
4347 FIELD, 4347 FIELD,
4348 CONSTANT_FUNCTION, 4348 CONSTANT_FUNCTION,
4349 CALLBACKS, 4349 CALLBACKS,
4350 INTERCEPTOR, 4350 INTERCEPTOR,
4351 MAP_TRANSITION, 4351 MAP_TRANSITION,
4352 NONEXISTENT 4352 NONEXISTENT
4353 }; 4353 };
4354 4354
4355 enum StubHolder {
4356 OWN_STUB,
4357 PROTOTYPE_STUB
4358 };
4359
4355 enum { 4360 enum {
4356 NUMBER_OF_KINDS = LAST_IC_KIND + 1 4361 NUMBER_OF_KINDS = LAST_IC_KIND + 1
4357 }; 4362 };
4358 4363
4359 typedef int ExtraICState; 4364 typedef int ExtraICState;
4360 4365
4361 static const ExtraICState kNoExtraICState = 0; 4366 static const ExtraICState kNoExtraICState = 0;
4362 4367
4363 #ifdef ENABLE_DISASSEMBLER 4368 #ifdef ENABLE_DISASSEMBLER
4364 // Printing 4369 // Printing
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
4540 void FindAllMaps(MapHandleList* maps); 4545 void FindAllMaps(MapHandleList* maps);
4541 4546
4542 // Find the first code in an IC stub. 4547 // Find the first code in an IC stub.
4543 Code* FindFirstCode(); 4548 Code* FindFirstCode();
4544 void FindAllCode(CodeHandleList* code_list, int length); 4549 void FindAllCode(CodeHandleList* code_list, int length);
4545 4550
4546 class ExtraICStateStrictMode: public BitField<StrictModeFlag, 0, 1> {}; 4551 class ExtraICStateStrictMode: public BitField<StrictModeFlag, 0, 1> {};
4547 class ExtraICStateKeyedAccessStoreMode: 4552 class ExtraICStateKeyedAccessStoreMode:
4548 public BitField<KeyedAccessStoreMode, 1, 4> {}; // NOLINT 4553 public BitField<KeyedAccessStoreMode, 1, 4> {}; // NOLINT
4549 4554
4555 class ExtraICStateStubHolder: public BitField<StubHolder, 0, 1> {};
4556
4550 static inline StrictModeFlag GetStrictMode(ExtraICState extra_ic_state) { 4557 static inline StrictModeFlag GetStrictMode(ExtraICState extra_ic_state) {
4551 return ExtraICStateStrictMode::decode(extra_ic_state); 4558 return ExtraICStateStrictMode::decode(extra_ic_state);
4552 } 4559 }
4553 4560
4554 static inline KeyedAccessStoreMode GetKeyedAccessStoreMode( 4561 static inline KeyedAccessStoreMode GetKeyedAccessStoreMode(
4555 ExtraICState extra_ic_state) { 4562 ExtraICState extra_ic_state) {
4556 return ExtraICStateKeyedAccessStoreMode::decode(extra_ic_state); 4563 return ExtraICStateKeyedAccessStoreMode::decode(extra_ic_state);
4557 } 4564 }
4558 4565
4559 static inline ExtraICState ComputeExtraICState( 4566 static inline ExtraICState ComputeExtraICState(
4560 KeyedAccessStoreMode store_mode, 4567 KeyedAccessStoreMode store_mode,
4561 StrictModeFlag strict_mode) { 4568 StrictModeFlag strict_mode) {
4562 return ExtraICStateKeyedAccessStoreMode::encode(store_mode) | 4569 return ExtraICStateKeyedAccessStoreMode::encode(store_mode) |
4563 ExtraICStateStrictMode::encode(strict_mode); 4570 ExtraICStateStrictMode::encode(strict_mode);
4564 } 4571 }
4565 4572
4573 static inline ExtraICState ComputeExtraICState(StubHolder stub_holder) {
4574 return ExtraICStateStubHolder::encode(stub_holder);
4575 }
4576
4566 // Flags operations. 4577 // Flags operations.
4567 static inline Flags ComputeFlags( 4578 static inline Flags ComputeFlags(
4568 Kind kind, 4579 Kind kind,
4569 InlineCacheState ic_state = UNINITIALIZED, 4580 InlineCacheState ic_state = UNINITIALIZED,
4570 ExtraICState extra_ic_state = kNoExtraICState, 4581 ExtraICState extra_ic_state = kNoExtraICState,
4571 StubType type = NORMAL, 4582 StubType type = NORMAL,
4572 int argc = -1, 4583 int argc = -1,
4573 InlineCacheHolderFlag holder = OWN_MAP); 4584 InlineCacheHolderFlag holder = OWN_MAP);
4574 4585
4575 static inline Flags ComputeMonomorphicFlags( 4586 static inline Flags ComputeMonomorphicFlags(
(...skipping 4721 matching lines...) Expand 10 before | Expand all | Expand 10 after
9297 } else { 9308 } else {
9298 value &= ~(1 << bit_position); 9309 value &= ~(1 << bit_position);
9299 } 9310 }
9300 return value; 9311 return value;
9301 } 9312 }
9302 }; 9313 };
9303 9314
9304 } } // namespace v8::internal 9315 } } // namespace v8::internal
9305 9316
9306 #endif // V8_OBJECTS_H_ 9317 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698