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

Side by Side Diff: src/globals.h

Issue 1155703006: Revert of Embedded constant pools. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/frames.cc ('k') | src/heap-snapshot-generator.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_GLOBALS_H_ 5 #ifndef V8_GLOBALS_H_
6 #define V8_GLOBALS_H_ 6 #define V8_GLOBALS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 #define USE_SIMULATOR 1 67 #define USE_SIMULATOR 1
68 #endif 68 #endif
69 #if (V8_TARGET_ARCH_MIPS && !V8_HOST_ARCH_MIPS) 69 #if (V8_TARGET_ARCH_MIPS && !V8_HOST_ARCH_MIPS)
70 #define USE_SIMULATOR 1 70 #define USE_SIMULATOR 1
71 #endif 71 #endif
72 #if (V8_TARGET_ARCH_MIPS64 && !V8_HOST_ARCH_MIPS64) 72 #if (V8_TARGET_ARCH_MIPS64 && !V8_HOST_ARCH_MIPS64)
73 #define USE_SIMULATOR 1 73 #define USE_SIMULATOR 1
74 #endif 74 #endif
75 #endif 75 #endif
76 76
77 // Determine whether the architecture uses an embedded constant pool 77 // Determine whether the architecture uses an out-of-line constant pool.
78 // (contiguous constant pool embedded in code object). 78 #define V8_OOL_CONSTANT_POOL 0
79 #if V8_TARGET_ARCH_PPC
80 #define V8_EMBEDDED_CONSTANT_POOL 1
81 #else
82 #define V8_EMBEDDED_CONSTANT_POOL 0
83 #endif
84 79
85 #ifdef V8_TARGET_ARCH_ARM 80 #ifdef V8_TARGET_ARCH_ARM
86 // Set stack limit lower for ARM than for other architectures because 81 // Set stack limit lower for ARM than for other architectures because
87 // stack allocating MacroAssembler takes 120K bytes. 82 // stack allocating MacroAssembler takes 120K bytes.
88 // See issue crbug.com/405338 83 // See issue crbug.com/405338
89 #define V8_DEFAULT_STACK_SIZE_KB 864 84 #define V8_DEFAULT_STACK_SIZE_KB 864
90 #else 85 #else
91 // Slightly less than 1MB, since Windows' default stack size for 86 // Slightly less than 1MB, since Windows' default stack size for
92 // the main execution thread is 1MB for both 32 and 64-bit. 87 // the main execution thread is 1MB for both 32 and 64-bit.
93 #define V8_DEFAULT_STACK_SIZE_KB 984 88 #define V8_DEFAULT_STACK_SIZE_KB 984
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 // ParseRestriction is used to restrict the set of valid statements in a 491 // ParseRestriction is used to restrict the set of valid statements in a
497 // unit of compilation. Restriction violations cause a syntax error. 492 // unit of compilation. Restriction violations cause a syntax error.
498 enum ParseRestriction { 493 enum ParseRestriction {
499 NO_PARSE_RESTRICTION, // All expressions are allowed. 494 NO_PARSE_RESTRICTION, // All expressions are allowed.
500 ONLY_SINGLE_FUNCTION_LITERAL // Only a single FunctionLiteral expression. 495 ONLY_SINGLE_FUNCTION_LITERAL // Only a single FunctionLiteral expression.
501 }; 496 };
502 497
503 // A CodeDesc describes a buffer holding instructions and relocation 498 // A CodeDesc describes a buffer holding instructions and relocation
504 // information. The instructions start at the beginning of the buffer 499 // information. The instructions start at the beginning of the buffer
505 // and grow forward, the relocation information starts at the end of 500 // and grow forward, the relocation information starts at the end of
506 // the buffer and grows backward. A constant pool may exist at the 501 // the buffer and grows backward.
507 // end of the instructions.
508 // 502 //
509 // |<--------------- buffer_size ----------------------------------->| 503 // |<--------------- buffer_size ---------------->|
510 // |<------------- instr_size ---------->| |<-- reloc_size -->| 504 // |<-- instr_size -->| |<-- reloc_size -->|
511 // | |<- const_pool_size ->| | 505 // +==================+========+==================+
512 // +=====================================+========+==================+ 506 // | instructions | free | reloc info |
513 // | instructions | data | free | reloc info | 507 // +==================+========+==================+
514 // +=====================================+========+==================+
515 // ^ 508 // ^
516 // | 509 // |
517 // buffer 510 // buffer
518 511
519 struct CodeDesc { 512 struct CodeDesc {
520 byte* buffer; 513 byte* buffer;
521 int buffer_size; 514 int buffer_size;
522 int instr_size; 515 int instr_size;
523 int reloc_size; 516 int reloc_size;
524 int constant_pool_size;
525 Assembler* origin; 517 Assembler* origin;
526 }; 518 };
527 519
528 520
529 // Callback function used for iterating objects in heap spaces, 521 // Callback function used for iterating objects in heap spaces,
530 // for example, scanning heap objects. 522 // for example, scanning heap objects.
531 typedef int (*HeapObjectCallback)(HeapObject* obj); 523 typedef int (*HeapObjectCallback)(HeapObject* obj);
532 524
533 525
534 // Callback function used for checking constraints when copying/relocating 526 // Callback function used for checking constraints when copying/relocating
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { 950 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) {
959 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); 951 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral);
960 DCHECK(IsValidFunctionKind(kind)); 952 DCHECK(IsValidFunctionKind(kind));
961 return kind; 953 return kind;
962 } 954 }
963 } } // namespace v8::internal 955 } } // namespace v8::internal
964 956
965 namespace i = v8::internal; 957 namespace i = v8::internal;
966 958
967 #endif // V8_GLOBALS_H_ 959 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698