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

Side by Side Diff: src/globals.h

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