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

Side by Side Diff: src/globals.h

Issue 1162993006: Add support for Embedded Constant Pools for PPC and Arm (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
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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 // ParseRestriction is used to restrict the set of valid statements in a 508 // ParseRestriction is used to restrict the set of valid statements in a
504 // unit of compilation. Restriction violations cause a syntax error. 509 // unit of compilation. Restriction violations cause a syntax error.
505 enum ParseRestriction { 510 enum ParseRestriction {
506 NO_PARSE_RESTRICTION, // All expressions are allowed. 511 NO_PARSE_RESTRICTION, // All expressions are allowed.
507 ONLY_SINGLE_FUNCTION_LITERAL // Only a single FunctionLiteral expression. 512 ONLY_SINGLE_FUNCTION_LITERAL // Only a single FunctionLiteral expression.
508 }; 513 };
509 514
510 // A CodeDesc describes a buffer holding instructions and relocation 515 // A CodeDesc describes a buffer holding instructions and relocation
511 // information. The instructions start at the beginning of the buffer 516 // information. The instructions start at the beginning of the buffer
512 // and grow forward, the relocation information starts at the end of 517 // and grow forward, the relocation information starts at the end of
513 // the buffer and grows backward. 518 // the buffer and grows backward. A constant pool may exist at the
519 // end of the instructions.
514 // 520 //
515 // |<--------------- buffer_size ---------------->| 521 // |<--------------- buffer_size ----------------------------------->|
516 // |<-- instr_size -->| |<-- reloc_size -->| 522 // |<------------- instr_size ---------->| |<-- reloc_size -->|
517 // +==================+========+==================+ 523 // | |<- const_pool_size ->| |
518 // | instructions | free | reloc info | 524 // +=====================================+========+==================+
519 // +==================+========+==================+ 525 // | instructions | data | free | reloc info |
526 // +=====================================+========+==================+
520 // ^ 527 // ^
521 // | 528 // |
522 // buffer 529 // buffer
523 530
524 struct CodeDesc { 531 struct CodeDesc {
525 byte* buffer; 532 byte* buffer;
526 int buffer_size; 533 int buffer_size;
527 int instr_size; 534 int instr_size;
528 int reloc_size; 535 int reloc_size;
536 int constant_pool_size;
529 Assembler* origin; 537 Assembler* origin;
530 }; 538 };
531 539
532 540
533 // Callback function used for iterating objects in heap spaces, 541 // Callback function used for iterating objects in heap spaces,
534 // for example, scanning heap objects. 542 // for example, scanning heap objects.
535 typedef int (*HeapObjectCallback)(HeapObject* obj); 543 typedef int (*HeapObjectCallback)(HeapObject* obj);
536 544
537 545
538 // Callback function used for checking constraints when copying/relocating 546 // Callback function used for checking constraints when copying/relocating
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { 970 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) {
963 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); 971 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral);
964 DCHECK(IsValidFunctionKind(kind)); 972 DCHECK(IsValidFunctionKind(kind));
965 return kind; 973 return kind;
966 } 974 }
967 } } // namespace v8::internal 975 } } // namespace v8::internal
968 976
969 namespace i = v8::internal; 977 namespace i = v8::internal;
970 978
971 #endif // V8_GLOBALS_H_ 979 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | src/heap-snapshot-generator.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698