Skip to content

Commit

Permalink
Merge PR #194: Update Truffle to state of 2017-11-09
Browse files Browse the repository at this point in the history
  • Loading branch information
smarr authored Nov 22, 2017
2 parents 40d678c + b742d10 commit dedcc86
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion libs/truffle
Submodule truffle updated 495 files
4 changes: 2 additions & 2 deletions src/som/compiler/SourcecodeCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public final SomLanguage getLanguage() {
public MixinDefinition compileModule(final Source source,
final StructuralProbe structuralProbe)
throws ProgramDefinitionError {
Parser parser = new Parser(
source.getCode(), source.getLength(), source, structuralProbe, language);
Parser parser = new Parser(source.getCharacters().toString(), source.getLength(), source,
structuralProbe, language);
return compile(parser, source);
}

Expand Down
3 changes: 1 addition & 2 deletions src/som/primitives/arithmetic/AdditionPrim.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.math.BigInteger;

import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.ExactMath;
import com.oracle.truffle.api.dsl.GenerateNodeFactory;
import com.oracle.truffle.api.dsl.Specialization;

Expand All @@ -19,7 +18,7 @@
public abstract class AdditionPrim extends ArithmeticPrim {
@Specialization(rewriteOn = ArithmeticException.class)
public final long doLong(final long left, final long argument) {
return ExactMath.addExact(left, argument);
return Math.addExact(left, argument);
}

@Specialization
Expand Down
3 changes: 1 addition & 2 deletions src/som/primitives/arithmetic/MultiplicationPrim.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.math.BigInteger;

import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.ExactMath;
import com.oracle.truffle.api.dsl.GenerateNodeFactory;
import com.oracle.truffle.api.dsl.Specialization;

Expand All @@ -17,7 +16,7 @@
public abstract class MultiplicationPrim extends ArithmeticPrim {
@Specialization(rewriteOn = ArithmeticException.class)
public final long doLong(final long left, final long right) {
return ExactMath.multiplyExact(left, right);
return Math.multiplyExact(left, right);
}

@Specialization
Expand Down
3 changes: 1 addition & 2 deletions src/som/primitives/arithmetic/SubtractionPrim.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.math.BigInteger;

import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.ExactMath;
import com.oracle.truffle.api.dsl.GenerateNodeFactory;
import com.oracle.truffle.api.dsl.Specialization;

Expand All @@ -17,7 +16,7 @@
public abstract class SubtractionPrim extends ArithmeticPrim {
@Specialization(rewriteOn = ArithmeticException.class)
public final long doLong(final long left, final long right) {
return ExactMath.subtractExact(left, right);
return Math.subtractExact(left, right);
}

@Specialization
Expand Down
2 changes: 1 addition & 1 deletion src/tools/debugger/FrontendConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ private static TaggedSourceCoordinate[] createSourceSections(final Source source
private void sendSource(final Source source,
final Map<Source, Map<SourceSection, Set<Class<? extends Tags>>>> loadedSourcesTags,
final Set<RootNode> rootNodes) {
SourceData data = new SourceData(source.getCode(), source.getMimeType(),
SourceData data = new SourceData(source.getCharacters().toString(), source.getMimeType(),
source.getName(), source.getURI().toString(),
createSourceSections(source, loadedSourcesTags, instrumenter, rootNodes),
SourceMessage.createMethodDefinitions(rootNodes));
Expand Down
2 changes: 1 addition & 1 deletion src/tools/dym/JsonWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private <U> Map<U, String> createIdMap(final Set<U> set, final String idPrefix)
private JSONObjectBuilder sourceToJson(final Source s, final String id) {
JSONObjectBuilder builder = JSONHelper.object();
builder.add("id", id);
builder.add("sourceText", s.getCode());
builder.add("sourceText", s.getCharacters().toString());
builder.add("mimeType", s.getMimeType());
builder.add("name", s.getName());
builder.add("uri", s.getURI().toString());
Expand Down

0 comments on commit dedcc86

Please sign in to comment.