37 using namespace v8::internal;
39 typedef void* (*F)(
int x,
int y,
int p2,
int p3,
int p4);
44 static byte to_non_zero(
int n) {
45 return static_cast<unsigned>(n) % 255 + 1;
49 static bool all_zeroes(
const byte* beg,
const byte* end) {
62 Isolate* isolate = Isolate::Current();
65 const int data_size = 1 *
KB;
71 CHECK(act_size >= static_cast<size_t>(data_size));
74 CHECK(act_size >= static_cast<size_t>(data_size));
98 CHECK(code->IsCode());
103 for (
int i = 0; i < data_size; i++) {
104 src_buffer[i] = to_non_zero(i);
110 for (
const byte* src = src_buffer; src < src_buffer + fuzz; src++) {
111 for (
byte* dest = dest_buffer; dest < dest_buffer + fuzz; dest++) {
112 memset(dest_buffer, 0, data_size);
113 CHECK(dest +
size < dest_buffer + data_size);
115 reinterpret_cast<int>(dest),
size, 0, 0);
120 CHECK(all_zeroes(dest_buffer, dest));
121 CHECK(all_zeroes(dest +
size, dest_buffer + data_size));
129 for (
int i = 0; i < data_size; i++) {
130 CHECK(src_buffer[i] == to_non_zero(i));
135 typedef int (*
F5)(
void*,
void*,
void*,
void*,
void*);
138 TEST(LoadAndStoreWithRepresentation) {
149 MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
225 CHECK(code->IsCode());
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
static Representation UInteger8()
static bool Initialize(Deserializer *des)
#define CHECK_EQ(expected, value)
static const int kMinimalBufferSize
static Representation Integer16()
static Code * cast(Object *obj)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object size
void GetCode(CodeDesc *desc)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra code(assertions) for debugging") DEFINE_bool(code_comments
static i::Isolate * i_isolate()
#define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4)
MUST_USE_RESULT MaybeObject * CreateCode(const CodeDesc &desc, Code::Flags flags, Handle< Object > self_reference, bool immovable=false, bool crankshafted=false, int prologue_offset=Code::kPrologueOffsetNotSet)
void Load(const v8::FunctionCallbackInfo< v8::Value > &args)
static void InitializeVM()
static Flags ComputeFlags(Kind kind, InlineCacheState ic_state=UNINITIALIZED, ExtraICState extra_ic_state=kNoExtraICState, StubType type=NORMAL, InlineCacheHolderFlag holder=OWN_MAP)
int(* F5)(void *, void *, void *, void *, void *)
static void * Allocate(const size_t requested, size_t *allocated, bool is_executable)
void CopyBytes(uint8_t *target, uint8_t *source)
static Representation UInteger16()
static Representation Integer8()