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

Side by Side Diff: third_party/WebKit/JavaScriptCore/jit/JIT.cpp

Issue 39293: WebKit merge 41447:41498 [third_party/WebKit] (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: remove CRLF Created 11 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 #if ENABLE(OPCODE_SAMPLING) 297 #if ENABLE(OPCODE_SAMPLING)
298 if (m_bytecodeIndex > 0) // Avoid the overhead of sampling op_enter twic e. 298 if (m_bytecodeIndex > 0) // Avoid the overhead of sampling op_enter twic e.
299 sampleInstruction(currentInstruction); 299 sampleInstruction(currentInstruction);
300 #endif 300 #endif
301 301
302 m_labels[m_bytecodeIndex] = label(); 302 m_labels[m_bytecodeIndex] = label();
303 OpcodeID opcodeID = m_interpreter->getOpcodeID(currentInstruction->u.opc ode); 303 OpcodeID opcodeID = m_interpreter->getOpcodeID(currentInstruction->u.opc ode);
304 304
305 switch (opcodeID) { 305 switch (opcodeID) {
306 case op_mov: { 306 case op_mov: {
307 emitGetVirtualRegister(currentInstruction[2].u.operand, regT0); 307 int src = currentInstruction[2].u.operand;
308 emitPutVirtualRegister(currentInstruction[1].u.operand); 308 int dst = currentInstruction[1].u.operand;
309
310 if (m_codeBlock->isConstantRegisterIndex(src)) {
311 storePtr(ImmPtr(JSValuePtr::encode(getConstantOperand(src))), Ad dress(callFrameRegister, dst * sizeof(Register)));
312 if (dst == m_lastResultBytecodeRegister)
313 killLastResultRegister();
314 } else {
315 emitGetVirtualRegister(src, regT0);
316 emitPutVirtualRegister(dst);
317 }
309 NEXT_OPCODE(op_mov); 318 NEXT_OPCODE(op_mov);
310 } 319 }
311 case op_add: { 320 case op_add: {
312 compileFastArith_op_add(currentInstruction); 321 compileFastArith_op_add(currentInstruction);
313 NEXT_OPCODE(op_add); 322 NEXT_OPCODE(op_add);
314 } 323 }
315 case op_end: { 324 case op_end: {
316 if (m_codeBlock->needsFullScopeChain()) 325 if (m_codeBlock->needsFullScopeChain())
317 emitCTICall(JITStubs::cti_op_end); 326 emitCTICall(JITStubs::cti_op_end);
318 ASSERT(returnValueRegister != callFrameRegister); 327 ASSERT(returnValueRegister != callFrameRegister);
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1916 loadPtr(Address(variableObject, FIELD_OFFSET(JSVariableObject, d)), variable Object); 1925 loadPtr(Address(variableObject, FIELD_OFFSET(JSVariableObject, d)), variable Object);
1917 loadPtr(Address(variableObject, FIELD_OFFSET(JSVariableObject::JSVariableObj ectData, registers)), variableObject); 1926 loadPtr(Address(variableObject, FIELD_OFFSET(JSVariableObject::JSVariableObj ectData, registers)), variableObject);
1918 storePtr(src, Address(variableObject, index * sizeof(Register))); 1927 storePtr(src, Address(variableObject, index * sizeof(Register)));
1919 } 1928 }
1920 1929
1921 } // namespace JSC 1930 } // namespace JSC
1922 1931
1923 #endif // ENABLE(JIT) 1932 #endif // ENABLE(JIT)
1924 1933
1925 1934
OLDNEW
« no previous file with comments | « third_party/WebKit/JavaScriptCore/assembler/X86Assembler.h ('k') | third_party/WebKit/JavaScriptCore/wtf/Platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698