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

Side by Side Diff: src/objects.h

Issue 17636003: Fix compilation error introduced with r15287. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Next try Created 7 years, 6 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/heap.h ('k') | src/objects-inl.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 4421 matching lines...) Expand 10 before | Expand all | Expand 10 after
4432 class SafepointEntry; 4432 class SafepointEntry;
4433 class TypeFeedbackInfo; 4433 class TypeFeedbackInfo;
4434 4434
4435 // Code describes objects with on-the-fly generated machine code. 4435 // Code describes objects with on-the-fly generated machine code.
4436 class Code: public HeapObject { 4436 class Code: public HeapObject {
4437 public: 4437 public:
4438 // Opaque data type for encapsulating code flags like kind, inline 4438 // Opaque data type for encapsulating code flags like kind, inline
4439 // cache state, and arguments count. 4439 // cache state, and arguments count.
4440 typedef uint32_t Flags; 4440 typedef uint32_t Flags;
4441 4441
4442 #define CODE_KIND_LIST(V) \ 4442 #define NON_IC_KIND_LIST(V) \
4443 V(FUNCTION) \ 4443 V(FUNCTION) \
4444 V(OPTIMIZED_FUNCTION) \ 4444 V(OPTIMIZED_FUNCTION) \
4445 V(STUB) \ 4445 V(STUB) \
4446 V(BUILTIN) \ 4446 V(BUILTIN) \
4447 V(LOAD_IC) \
4448 V(KEYED_LOAD_IC) \
4449 V(CALL_IC) \
4450 V(KEYED_CALL_IC) \
4451 V(STORE_IC) \
4452 V(KEYED_STORE_IC) \
4453 V(UNARY_OP_IC) \
4454 V(BINARY_OP_IC) \
4455 V(COMPARE_IC) \
4456 V(COMPARE_NIL_IC) \
4457 V(TO_BOOLEAN_IC) \
4458 V(REGEXP) 4447 V(REGEXP)
4459 4448
4449 #define IC_KIND_LIST(V) \
4450 V(LOAD_IC) \
4451 V(KEYED_LOAD_IC) \
4452 V(CALL_IC) \
4453 V(KEYED_CALL_IC) \
4454 V(STORE_IC) \
4455 V(KEYED_STORE_IC) \
4456 V(UNARY_OP_IC) \
4457 V(BINARY_OP_IC) \
4458 V(COMPARE_IC) \
4459 V(COMPARE_NIL_IC) \
4460 V(TO_BOOLEAN_IC)
4461
4462 #define CODE_KIND_LIST(V) \
4463 NON_IC_KIND_LIST(V) \
4464 IC_KIND_LIST(V)
4460 4465
4461 enum Kind { 4466 enum Kind {
4462 #define DEFINE_CODE_KIND_ENUM(name) name, 4467 #define DEFINE_CODE_KIND_ENUM(name) name,
4463 CODE_KIND_LIST(DEFINE_CODE_KIND_ENUM) 4468 CODE_KIND_LIST(DEFINE_CODE_KIND_ENUM)
4464 #undef DEFINE_CODE_KIND_ENUM 4469 #undef DEFINE_CODE_KIND_ENUM
4470 };
4465 4471
4466 // Pseudo-kinds. 4472 enum {
4467 LAST_CODE_KIND = TO_BOOLEAN_IC, 4473 #define COUNT_FLAG(name) + 1
4468 FIRST_IC_KIND = LOAD_IC, 4474 NUMBER_OF_KINDS = 0 CODE_KIND_LIST(COUNT_FLAG)
4469 LAST_IC_KIND = TO_BOOLEAN_IC 4475 #undef COUNT_FLAG
4470 }; 4476 };
4471 4477
4472 // No more than 16 kinds. The value is currently encoded in four bits in 4478 // No more than 16 kinds. The value is currently encoded in four bits in
4473 // Flags. 4479 // Flags.
4474 STATIC_ASSERT(LAST_CODE_KIND < 16); 4480 STATIC_ASSERT(NUMBER_OF_KINDS <= 16);
4475 4481
4476 static const char* Kind2String(Kind kind); 4482 static const char* Kind2String(Kind kind);
4477 4483
4478 // Types of stubs. 4484 // Types of stubs.
4479 enum StubType { 4485 enum StubType {
4480 NORMAL, 4486 NORMAL,
4481 FIELD, 4487 FIELD,
4482 CONSTANT_FUNCTION, 4488 CONSTANT_FUNCTION,
4483 CALLBACKS, 4489 CALLBACKS,
4484 INTERCEPTOR, 4490 INTERCEPTOR,
4485 MAP_TRANSITION, 4491 MAP_TRANSITION,
4486 NONEXISTENT 4492 NONEXISTENT
4487 }; 4493 };
4488 4494
4489 enum StubHolder { 4495 enum StubHolder {
4490 OWN_STUB, 4496 OWN_STUB,
4491 PROTOTYPE_STUB 4497 PROTOTYPE_STUB
4492 }; 4498 };
4493 4499
4494 enum {
4495 NUMBER_OF_KINDS = LAST_IC_KIND + 1
4496 };
4497
4498 typedef int ExtraICState; 4500 typedef int ExtraICState;
4499 4501
4500 static const ExtraICState kNoExtraICState = 0; 4502 static const ExtraICState kNoExtraICState = 0;
4501 4503
4502 #ifdef ENABLE_DISASSEMBLER 4504 #ifdef ENABLE_DISASSEMBLER
4503 // Printing 4505 // Printing
4504 static const char* ICState2String(InlineCacheState state); 4506 static const char* ICState2String(InlineCacheState state);
4505 static const char* StubType2String(StubType type); 4507 static const char* StubType2String(StubType type);
4506 static void PrintExtraICState(FILE* out, Kind kind, ExtraICState extra); 4508 static void PrintExtraICState(FILE* out, Kind kind, ExtraICState extra);
4507 inline void Disassemble(const char* name) { 4509 inline void Disassemble(const char* name) {
(...skipping 5220 matching lines...) Expand 10 before | Expand all | Expand 10 after
9728 } else { 9730 } else {
9729 value &= ~(1 << bit_position); 9731 value &= ~(1 << bit_position);
9730 } 9732 }
9731 return value; 9733 return value;
9732 } 9734 }
9733 }; 9735 };
9734 9736
9735 } } // namespace v8::internal 9737 } } // namespace v8::internal
9736 9738
9737 #endif // V8_OBJECTS_H_ 9739 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698