39 using namespace v8::internal;
43 static void InitializeVM() {
53 static void DummyStaticFunction(
Object* result) {
61 Assembler assm(Isolate::Current(), buffer,
sizeof buffer);
62 DummyStaticFunction(
NULL);
65 __ addq(
rax, Immediate(12345678));
66 __ or_(
rax, Immediate(12345678));
67 __ subq(
rax, Immediate(12345678));
68 __ xor_(
rax, Immediate(12345678));
69 __ and_(
rax, Immediate(12345678));
88 __ addq(
rbx, Immediate(12));
91 __ and_(
rdx, Immediate(3));
93 __ cmpq(
rdx, Immediate(3));
98 __ or_(
rdx, Immediate(3));
99 __ xor_(
rdx, Immediate(3));
103 CpuFeatures::Scope fscope(
CPUID);
108 CpuFeatures::Scope fscope(
RDTSC);
125 __ push(Immediate(12));
126 __ push(Immediate(23456));
141 __ movb(
rcx, Immediate(6));
151 __ movq(
rdx, Immediate(1234567));
157 __ decb(Operand(
rax, 10));
180 __ or_(
rdx, Immediate(12345));
185 __ rcl(
rdx, Immediate(1));
186 __ rcl(
rdx, Immediate(7));
187 __ rcr(
rdx, Immediate(1));
188 __ rcr(
rdx, Immediate(7));
189 __ sar(
rdx, Immediate(1));
190 __ sar(
rdx, Immediate(6));
194 __ shl(
rdx, Immediate(1));
195 __ shl(
rdx, Immediate(6));
198 __ shr(
rdx, Immediate(1));
199 __ shr(
rdx, Immediate(7));
205 __ addq(
rbx, Immediate(12));
208 __ and_(
rbx, Immediate(12345));
210 __ cmpq(
rbx, Immediate(12345));
211 __ cmpq(
rbx, Immediate(12));
213 __ cmpb(
rax, Immediate(100));
215 __ or_(
rbx, Immediate(12345));
217 __ subq(
rbx, Immediate(12));
220 __ xor_(
rbx, Immediate(12345));
230 __ testq(
rdx, Immediate(12345));
233 __ testb(Operand(
rax, -20), Immediate(0x9A));
236 __ xor_(
rdx, Immediate(12345));
255 Handle<Code> ic(Isolate::Current()->builtins()->builtin(
256 Builtins::kLoadIC_Initialize));
257 __ call(ic, RelocInfo::CODE_TARGET);
263 #ifdef ENABLE_DEBUGGER_SUPPORT
264 ExternalReference after_break_target =
265 ExternalReference(Debug_Address::AfterBreakTarget(),
267 USE(after_break_target);
268 #endif // ENABLE_DEBUGGER_SUPPORT
269 __ jmp(ic, RelocInfo::CODE_TARGET);
353 CpuFeatures::Scope fscope(
SSE2);
376 CpuFeatures::Scope use_cmov(
CMOV);
399 CpuFeatures::Scope fscope(
SSE2);
409 for (
int i = 0; i < 16; i++) {
421 CHECK(code->IsCode());
static void Disassemble(FILE *f, byte *begin, byte *end)
Isolate * isolate() const
static bool IsSupported(CpuFeature f)
static Code * cast(Object *obj)
byte * instruction_start()
void GetCode(CodeDesc *desc)
static const int kFunctionOffset
static Flags ComputeFlags(Kind kind, InlineCacheState ic_state=UNINITIALIZED, ExtraICState extra_ic_state=kNoExtraICState, PropertyType type=NORMAL, int argc=-1, InlineCacheHolderFlag holder=OWN_MAP)
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination trace on stack replacement optimize closures functions with arguments object optimize functions containing for in loops profiler considers IC stability primitive functions trigger their own optimization re try self optimization if it failed insert an interrupt check at function exit execution budget before interrupt is triggered call count before self optimization self_optimization count_based_interrupts weighted_back_edges trace_opt emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 enable use of ARMv7 instructions if enable use of MIPS FPU instructions if NULL
static Persistent< Context > New(ExtensionConfiguration *extensions=NULL, Handle< ObjectTemplate > global_template=Handle< ObjectTemplate >(), Handle< Value > global_object=Handle< Value >())