Changeset 57955 in webkit for trunk/JavaScriptCore/bytecompiler
- Timestamp:
- Apr 20, 2010, 11:41:20 PM (15 years ago)
- Location:
- trunk/JavaScriptCore/bytecompiler
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r55833 r57955 35 35 #include "JSFunction.h" 36 36 #include "Interpreter.h" 37 #include "RegExp.h" 38 #include "RegExpObject.h" 37 39 #include "UString.h" 38 40 … … 826 828 827 829 return &m_constantPoolRegisters[index]; 828 }829 830 unsigned BytecodeGenerator::addRegExp(RegExp* r)831 {832 return m_codeBlock->addRegExp(r);833 830 } 834 831 … … 983 980 } 984 981 982 RegisterID* BytecodeGenerator::emitLoad(RegisterID* dst, RegExp* regExp) 983 { 984 JSValue jsRegExp = new (globalData()) RegExpObject(m_scopeChain->globalObject()->regExpStructure(), regExp); 985 return emitLoad(dst, jsRegExp); 986 } 987 985 988 RegisterID* BytecodeGenerator::emitLoad(RegisterID* dst, JSValue v) 986 989 { … … 1362 1365 } 1363 1366 1364 RegisterID* BytecodeGenerator::emitNewRegExp(RegisterID* dst, RegExp* regExp)1365 {1366 emitOpcode(op_new_regexp);1367 instructions().append(dst->index());1368 instructions().append(addRegExp(regExp));1369 return dst;1370 }1371 1372 1373 1367 RegisterID* BytecodeGenerator::emitNewFunctionExpression(RegisterID* r0, FuncExprNode* n) 1374 1368 { -
trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.h
r51735 r57955 265 265 RegisterID* emitLoad(RegisterID* dst, double); 266 266 RegisterID* emitLoad(RegisterID* dst, const Identifier&); 267 RegisterID* emitLoad(RegisterID* dst, RegExp* regExp); 267 268 RegisterID* emitLoad(RegisterID* dst, JSValue); 268 269 … … 277 278 RegisterID* emitNewFunction(RegisterID* dst, FunctionBodyNode* body); 278 279 RegisterID* emitNewFunctionExpression(RegisterID* dst, FuncExprNode* func); 279 RegisterID* emitNewRegExp(RegisterID* dst, RegExp* regExp);280 280 281 281 RegisterID* emitMove(RegisterID* dst, RegisterID* src); … … 447 447 unsigned addConstant(const Identifier&); 448 448 RegisterID* addConstantValue(JSValue); 449 unsigned addRegExp(RegExp*);450 449 451 450 PassRefPtr<FunctionExecutable> makeFunction(ExecState* exec, FunctionBodyNode* body) -
trunk/JavaScriptCore/bytecompiler/NodesCodegen.cpp
r55833 r57955 150 150 if (dst == generator.ignoredResult()) 151 151 return 0; 152 return generator.emit NewRegExp(generator.finalDestination(dst), regExp.get());152 return generator.emitLoad(generator.finalDestination(dst), regExp.get()); 153 153 } 154 154
Note:
See TracChangeset
for help on using the changeset viewer.